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, List<Address> activeNodes)
OwnershipStatistics(OwnershipStatistics other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decOwned(Address a)
void
decPrimaryOwned(Address a)
int
getOwned(Address a)
int
getPrimaryOwned(Address a)
void
incOwned(Address a)
void
incPrimaryOwned(Address a)
int
sumOwned()
int
sumPrimaryOwned()
String
toString()
-
-
-
Constructor Detail
-
OwnershipStatistics
public OwnershipStatistics(ConsistentHash ch, List<Address> activeNodes)
-
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)
-
sumPrimaryOwned
public int sumPrimaryOwned()
-
sumOwned
public int sumOwned()
-
-