Class OwnershipStatistics
- java.lang.Object
-
- org.infinispan.distribution.ch.impl.OwnershipStatistics
-
public class OwnershipStatistics extends Object
This class holds statistics about a consistent hash. It counts how many segments are owned or primary-owned by each member.- Since:
- 5.2
- Author:
- Dan Berindei
-
-
Constructor Summary
Constructors Constructor Description OwnershipStatistics(List<Address> nodes)OwnershipStatistics(ConsistentHash ch)OwnershipStatistics(ConsistentHash ch, List<Address> activeNodes)OwnershipStatistics(OwnershipStatistics other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecOwned(int nodeIndex)voiddecOwned(Address a)voiddecPrimaryOwned(int nodeIndex)voiddecPrimaryOwned(Address a)intgetOwned(int nodeIndex)intgetOwned(Address a)intgetPrimaryOwned(int nodeIndex)intgetPrimaryOwned(Address a)voidincOwned(int nodeIndex)voidincOwned(int nodeIndex, boolean primary)voidincOwned(Address a)voidincPrimaryOwned(int nodeIndex)voidincPrimaryOwned(Address a)intsumOwned()intsumPrimaryOwned()StringtoString()
-
-
-
Constructor Detail
-
OwnershipStatistics
public OwnershipStatistics(ConsistentHash ch, List<Address> activeNodes)
-
OwnershipStatistics
public OwnershipStatistics(ConsistentHash ch)
-
OwnershipStatistics
public OwnershipStatistics(OwnershipStatistics other)
-
-
Method Detail
-
getPrimaryOwned
public int getPrimaryOwned(Address a)
-
getOwned
public int getOwned(Address a)
-
incPrimaryOwned
public void incPrimaryOwned(Address a)
-
incOwned
public void incOwned(Address a)
-
decPrimaryOwned
public void decPrimaryOwned(Address a)
-
decOwned
public void decOwned(Address a)
-
getPrimaryOwned
public int getPrimaryOwned(int nodeIndex)
-
getOwned
public int getOwned(int nodeIndex)
-
incPrimaryOwned
public void incPrimaryOwned(int nodeIndex)
-
incOwned
public void incOwned(int nodeIndex)
-
incOwned
public void incOwned(int nodeIndex, boolean primary)
-
decPrimaryOwned
public void decPrimaryOwned(int nodeIndex)
-
decOwned
public void decOwned(int nodeIndex)
-
sumPrimaryOwned
public int sumPrimaryOwned()
-
sumOwned
public int sumOwned()
-
-