Class Replicas

java.lang.Object
org.apache.cassandra.locator.Replicas

public class Replicas extends Object
  • Constructor Details

    • Replicas

      public Replicas()
  • Method Details

    • countFull

      public static int countFull(ReplicaCollection<?> replicas)
    • countInOurDc

      public static Replicas.ReplicaCount countInOurDc(ReplicaCollection<?> replicas)
    • countPerDc

      public static com.carrotsearch.hppc.ObjectObjectHashMap<String,Replicas.ReplicaCount> countPerDc(Collection<String> dataCenters, Iterable<Replica> replicas)
      count the number of full and transient replicas, separately, for each DC
    • addToCountPerDc

      public static void addToCountPerDc(com.carrotsearch.hppc.ObjectIntHashMap<String> perDc, 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(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(Iterable<Replica> replicas)
      For areas of the code that should never see a transient replica
    • stringify

      public static List<String> stringify(ReplicaCollection<?> replicas, boolean withPort)