public class Replicas
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Replicas.ReplicaCount |
Constructor and Description |
---|
Replicas() |
Modifier and Type | Method and 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 provided
|
static void |
assertFull(java.lang.Iterable<Replica> replicas)
For areas of the code that should never see a transient replica
|
static 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 DC
|
static 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 future
|
static void |
temporaryAssertFull(Replica replica)
A placeholder for areas of the code that cannot yet handle transient replicas, but should do so in future
|
public static int countFull(ReplicaCollection<?> replicas)
public static Replicas.ReplicaCount countInOurDc(ReplicaCollection<?> replicas)
public static com.carrotsearch.hppc.ObjectObjectHashMap<java.lang.String,Replicas.ReplicaCount> countPerDc(java.util.Collection<java.lang.String> dataCenters, java.lang.Iterable<Replica> replicas)
public static void addToCountPerDc(com.carrotsearch.hppc.ObjectIntHashMap<java.lang.String> perDc, java.lang.Iterable<Replica> replicas, int add)
public static void temporaryAssertFull(Replica replica)
public static void temporaryAssertFull(java.lang.Iterable<Replica> replicas)
public static void assertFull(java.lang.Iterable<Replica> replicas)
public static java.util.List<java.lang.String> stringify(ReplicaCollection<?> replicas, boolean withPort)
Copyright © 2009- The Apache Software Foundation