5c3158375a01e8672f6e487f28e9ae07146a5d94
Files Diff
- Added: 0
- Removed: 0
- Renamed: 0
- Modified: 7
Refactorings reported:
Refactoring Name | Occurences | ||
---|---|---|---|
Rename Method | 1 | ||
Rename Method protected computeExpectedSegmentsForNode(node Address, numCopies int) : double renamed to protected getExpectedOwnedSegments(node Address) : double in class org.infinispan.distribution.ch.impl.SyncConsistentHashFactory.Builder | From | To | |
Change Parameter Type | 2 | ||
Change Parameter Type site : String to site : Site in method package Rack(site Site, rackId String) in class org.infinispan.distribution.topologyaware.TopologyInfo.Rack | From | To | |
Change Parameter Type rack : String to rack : Rack in method package Machine(rack Rack, machineId String) in class org.infinispan.distribution.topologyaware.TopologyInfo.Machine | From | To | |
Inline Method | 3 | ||
Inline Method public getAllRacksCount() : int inlined to public getDistinctLocationsCount(level TopologyLevel) : int in class org.infinispan.distribution.topologyaware.TopologyInfo | From | To | |
Inline Method public getAllMachinesCount() : int inlined to public getDistinctLocationsCount(level TopologyLevel) : int in class org.infinispan.distribution.topologyaware.TopologyInfo | From | To | |
Inline Method public getAllSitesCount() : int inlined to public getDistinctLocationsCount(level TopologyLevel) : int in class org.infinispan.distribution.topologyaware.TopologyInfo | From | To | |
Rename Variable | 4 | ||
Rename Variable maxSegments : int to expectedOwnedSegments : float in method protected assertDistribution(currentMembers List<Address>, numOwners int, numSegments int) : void in class org.infinispan.distribution.topologyaware.TopologyAwareSyncConsistentHashFactoryTest | From | To | |
Rename Variable newMachines : Set<Object> to newLocations : Set<Object> in method private maintainsDiversity(owners List<Address>, candidate Address, replaced Address, level TopologyLevel) : boolean in class org.infinispan.distribution.ch.impl.TopologyAwareConsistentHashFactory | From | To | |
Rename Variable maxPrimarySegments : int to expectedPrimarySegments : float in method protected assertDistribution(currentMembers List<Address>, numOwners int, numSegments int) : void in class org.infinispan.distribution.topologyaware.TopologyAwareSyncConsistentHashFactoryTest | From | To | |
Rename Variable oldMachines : Set<Object> to oldLocations : Set<Object> in method private maintainsDiversity(owners List<Address>, candidate Address, replaced Address, level TopologyLevel) : boolean in class org.infinispan.distribution.ch.impl.TopologyAwareConsistentHashFactory | From | To | |
Change Return Type | 3 | ||
Change Return Type Set<String> to Collection<String> in method public getSiteRacks(site String) : Collection<String> in class org.infinispan.distribution.topologyaware.TopologyInfo | From | To | |
Change Return Type Set<String> to Collection<String> in method public getRackMachines(site String, rack String) : Collection<String> in class org.infinispan.distribution.topologyaware.TopologyInfo | From | To | |
Change Return Type Set<String> to Collection<String> in method public getAllSites() : Collection<String> in class org.infinispan.distribution.topologyaware.TopologyInfo | From | To | |
Replace Variable With Attribute | 1 | ||
Replace Variable With Attribute numCopies : int to actualNumOwners : int in method protected getExpectedOwnedSegments(node Address) : double in class org.infinispan.distribution.ch.impl.SyncConsistentHashFactory.Builder | From | To | |
Extract Superclass | 1 | ||
Extract Superclass org.infinispan.distribution.topologyaware.TopologyInfo.Location from classes [org.infinispan.distribution.topologyaware.TopologyInfo.Site, org.infinispan.distribution.topologyaware.TopologyInfo.Rack, org.infinispan.distribution.topologyaware.TopologyInfo.Machine] | From | To | |
Rename Attribute | 4 | ||
Rename Attribute rack : String to rackId : String in class org.infinispan.distribution.topologyaware.TopologyInfo.Rack | From | To | |
Rename Attribute CLUSTER_SIZE : int to ADDRESS_COUNT : int in class org.infinispan.distribution.topologyaware.TopologyAwareConsistentHashFactoryTest | From | To | |
Rename Attribute site : String to siteId : String in class org.infinispan.distribution.topologyaware.TopologyInfo.Site | From | To | |
Rename Attribute machine : String to machineId : String in class org.infinispan.distribution.topologyaware.TopologyInfo.Machine | From | To | |
Change Variable Type | 4 | ||
Change Variable Type maxPrimarySegments : int to expectedPrimarySegments : float in method protected assertDistribution(currentMembers List<Address>, numOwners int, numSegments int) : void in class org.infinispan.distribution.topologyaware.TopologyAwareSyncConsistentHashFactoryTest | From | To | |
Change Variable Type maxSegments : int to expectedOwnedSegments : float in method protected assertDistribution(currentMembers List<Address>, numOwners int, numSegments int) : void in class org.infinispan.distribution.topologyaware.TopologyAwareSyncConsistentHashFactoryTest | From | To | |
Change Variable Type expectedOwnedSegments : int to expectedOwnedSegments : float in method protected assertDistribution(currentMembers List<Address>, numOwners int, numSegments int) : void in class org.infinispan.distribution.topologyaware.TopologyAwareConsistentHashFactoryTest | From | To | |
Change Variable Type expectedPrimarySegments : int to expectedPrimarySegments : float in method protected assertDistribution(currentMembers List<Address>, numOwners int, numSegments int) : void in class org.infinispan.distribution.topologyaware.TopologyAwareConsistentHashFactoryTest | From | To | |
Extract Variable | 5 | ||
Extract Variable sitePrimaryOwned : int in method public toString() : String from class org.infinispan.distribution.topologyaware.TopologyAwareOwnershipStatistics | From | To | |
Extract Variable machinePrimaryOwned : int in method public toString() : String from class org.infinispan.distribution.topologyaware.TopologyAwareOwnershipStatistics | From | To | |
Extract Variable nodePrimaryOwned : int in method public toString() : String from class org.infinispan.distribution.topologyaware.TopologyAwareOwnershipStatistics | From | To | |
Extract Variable rackPrimaryOwned : int in method public toString() : String from class org.infinispan.distribution.topologyaware.TopologyAwareOwnershipStatistics | From | To | |
Extract Variable primaryOwned : int in method protected assertDistribution(currentMembers List<Address>, numOwners int, numSegments int) : void from class org.infinispan.distribution.topologyaware.TopologyAwareConsistentHashFactoryTest | From | To | |
Change Attribute Type | 5 | ||
Change Attribute Type machines : Map<String,Machine> to machines : List<Machine> in class org.infinispan.distribution.topologyaware.TopologyInfo.Rack | From | To | |
Change Attribute Type racks : Map<String,Rack> to racks : List<Rack> in class org.infinispan.distribution.topologyaware.TopologyInfo.Site | From | To | |
Change Attribute Type site : String to site : Site in class org.infinispan.distribution.topologyaware.TopologyInfo.Rack | From | To | |
Change Attribute Type nodes : List<Address> to nodes : List<Node> in class org.infinispan.distribution.topologyaware.TopologyInfo.Machine | From | To | |
Change Attribute Type rack : String to rack : Rack in class org.infinispan.distribution.topologyaware.TopologyInfo.Machine | From | To | |
Extract Method | 7 | ||
Extract Method protected assertDistribution(currentMembers List<Address>, numOwners int) : void extracted from public testConsistencyWhenNodeLeaves() : void in class org.infinispan.distribution.topologyaware.TopologyAwareConsistentHashFactoryTest | From | To | |
Extract Method public formatLocation(df DecimalFormat, location Location, prefix String) : String extracted from public toString() : String in class org.infinispan.distribution.topologyaware.TopologyInfo | From | To | |
Extract Method protected assertDistribution(currentMembers List<Address>, numOwners int) : void extracted from private assertAllLocationsWithRebalance(numOwners int) : void in class org.infinispan.distribution.topologyaware.TopologyAwareConsistentHashFactoryTest | From | To | |
Extract Method private updateConsistentHash(numOwners int, numSegments int) : void extracted from protected updateConsistentHash(numOwners int) : void in class org.infinispan.distribution.topologyaware.TopologyAwareConsistentHashFactoryTest | From | To | |
Extract Method private assertAllLocations(currentMembers List<Address>, numOwners int) : void extracted from public testConsistencyWhenNodeLeaves() : void in class org.infinispan.distribution.topologyaware.TopologyAwareConsistentHashFactoryTest | From | To | |
Extract Method private assertAllLocations(currentMembers List<Address>, numOwners int) : void extracted from private assertAllLocationsWithRebalance(numOwners int) : void in class org.infinispan.distribution.topologyaware.TopologyAwareConsistentHashFactoryTest | From | To | |
Rename Parameter | 4 | ||
Rename Parameter machine : TopologyLevel to level : TopologyLevel in method private maintainsDiversity(owners List<Address>, candidate Address, replaced Address, level TopologyLevel) : boolean in class org.infinispan.distribution.ch.impl.TopologyAwareConsistentHashFactory | From | To | |
Rename Parameter rack : String to rackId : String in method package Rack(site Site, rackId String) in class org.infinispan.distribution.topologyaware.TopologyInfo.Rack | From | To | |
Rename Parameter site : String to machineId : String in method package Machine(rack Rack, machineId String) in class org.infinispan.distribution.topologyaware.TopologyInfo.Machine | From | To | |
Rename Parameter site : String to siteId : String in method package Site(cluster Cluster, siteId String) in class org.infinispan.distribution.topologyaware.TopologyInfo.Site | From | To |