Class OwnershipStatistics
java.lang.Object
org.infinispan.distribution.ch.impl.OwnershipStatistics
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
ConstructorDescriptionOwnershipStatistics
(List<Address> nodes) OwnershipStatistics
(ConsistentHash ch, List<Address> activeNodes) -
Method Summary
Modifier and TypeMethodDescriptionvoid
decOwned
(int nodeIndex) void
void
decPrimaryOwned
(int nodeIndex) void
int
getOwned
(int nodeIndex) int
int
getPrimaryOwned
(int nodeIndex) int
void
incOwned
(int nodeIndex) void
incOwned
(int nodeIndex, boolean primary) void
void
incPrimaryOwned
(int nodeIndex) void
int
sumOwned()
int
toString()
-
Constructor Details
-
OwnershipStatistics
-
OwnershipStatistics
-
OwnershipStatistics
-
OwnershipStatistics
-
-
Method Details
-
getPrimaryOwned
-
getOwned
-
incPrimaryOwned
-
incOwned
-
decPrimaryOwned
-
decOwned
-
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() -
toString
-