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 void
decOwned(int nodeIndex)
void
decOwned(Address a)
void
decPrimaryOwned(int nodeIndex)
void
decPrimaryOwned(Address a)
int
getOwned(int nodeIndex)
int
getOwned(Address a)
int
getPrimaryOwned(int nodeIndex)
int
getPrimaryOwned(Address a)
void
incOwned(int nodeIndex)
void
incOwned(int nodeIndex, boolean primary)
void
incOwned(Address a)
void
incPrimaryOwned(int nodeIndex)
void
incPrimaryOwned(Address a)
int
sumOwned()
int
sumPrimaryOwned()
String
toString()
-
-
-
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()
-
-