public class PerReplicaStates extends Object implements ReflectMapWriter
Modifier and Type | Class and Description |
---|---|
static class |
PerReplicaStates.Operation |
static class |
PerReplicaStates.State
The state of a replica as stored as a node under /collections/collection-name/state.json/replica-state
|
MapWriter.EntryWriter
Modifier and Type | Field and Description |
---|---|
int |
cversion |
static int |
MAX_RETRIES |
String |
path |
static char |
SEPARATOR |
SimpleMap<PerReplicaStates.State> |
states |
Constructor and Description |
---|
PerReplicaStates(String path,
int cversion,
List<String> states)
Construct with data read from ZK
|
Modifier and Type | Method and Description |
---|---|
static PerReplicaStates |
fetch(String path,
SolrZkClient zkClient,
PerReplicaStates current)
Fetch the latest
PerReplicaStates . |
static Set<String> |
findModifiedReplicas(PerReplicaStates old,
PerReplicaStates fresh)
Get the changed replicas
|
PerReplicaStates.State |
get(String replica) |
static String |
getReplicaName(String s) |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
writeMap
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
public static final char SEPARATOR
public static final int MAX_RETRIES
public final String path
public final int cversion
public final SimpleMap<PerReplicaStates.State> states
public static Set<String> findModifiedReplicas(PerReplicaStates old, PerReplicaStates fresh)
public static PerReplicaStates fetch(String path, SolrZkClient zkClient, PerReplicaStates current)
PerReplicaStates
. It fetches data after checking the Stat.getCversion()
of state.json.
If this is not modified, the same object is returnedpublic PerReplicaStates.State get(String replica)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.