Package org.apache.cassandra.locator
Class Replicas
- java.lang.Object
-
- org.apache.cassandra.locator.Replicas
-
public class Replicas extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Replicas.ReplicaCount
-
Constructor Summary
Constructors Constructor Description Replicas()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
addToCountPerDc(com.carrotsearch.hppc.ObjectIntHashMap<java.lang.String> perDc, java.lang.Iterable<Replica> replicas, int add)
increment each of the map's DC entries for each matching replica providedstatic void
assertFull(java.lang.Iterable<Replica> replicas)
For areas of the code that should never see a transient replicastatic int
countFull(ReplicaCollection<?> replicas)
static Replicas.ReplicaCount
countInOurDc(ReplicaCollection<?> replicas)
static com.carrotsearch.hppc.ObjectObjectHashMap<java.lang.String,Replicas.ReplicaCount>
countPerDc(java.util.Collection<java.lang.String> dataCenters, java.lang.Iterable<Replica> replicas)
count the number of full and transient replicas, separately, for each DCstatic java.util.List<java.lang.String>
stringify(ReplicaCollection<?> replicas, boolean withPort)
static void
temporaryAssertFull(java.lang.Iterable<Replica> replicas)
A placeholder for areas of the code that cannot yet handle transient replicas, but should do so in futurestatic void
temporaryAssertFull(Replica replica)
A placeholder for areas of the code that cannot yet handle transient replicas, but should do so in future
-
-
-
Method Detail
-
countFull
public static int countFull(ReplicaCollection<?> replicas)
-
countInOurDc
public static Replicas.ReplicaCount countInOurDc(ReplicaCollection<?> replicas)
-
countPerDc
public static com.carrotsearch.hppc.ObjectObjectHashMap<java.lang.String,Replicas.ReplicaCount> countPerDc(java.util.Collection<java.lang.String> dataCenters, java.lang.Iterable<Replica> replicas)
count the number of full and transient replicas, separately, for each DC
-
addToCountPerDc
public static void addToCountPerDc(com.carrotsearch.hppc.ObjectIntHashMap<java.lang.String> perDc, java.lang.Iterable<Replica> replicas, int add)
increment each of the map's DC entries for each matching replica provided
-
temporaryAssertFull
public static void temporaryAssertFull(Replica replica)
A placeholder for areas of the code that cannot yet handle transient replicas, but should do so in future
-
temporaryAssertFull
public static void temporaryAssertFull(java.lang.Iterable<Replica> replicas)
A placeholder for areas of the code that cannot yet handle transient replicas, but should do so in future
-
assertFull
public static void assertFull(java.lang.Iterable<Replica> replicas)
For areas of the code that should never see a transient replica
-
stringify
public static java.util.List<java.lang.String> stringify(ReplicaCollection<?> replicas, boolean withPort)
-
-