public class ClusterNodeInfoDocument extends Document
ClusterNodeInfo.| Constructor and Description |
|---|
ClusterNodeInfoDocument() |
| Modifier and Type | Method and Description |
|---|---|
static List<ClusterNodeInfoDocument> |
all(DocumentStore store)
Returns all cluster node info documents currently available in the given
document store.
|
int |
getClusterId() |
long |
getCreated() |
String |
getLastWrittenRootRev()
the root-revision of the last background write (of unsaved modifications)
|
long |
getLeaseEndTime() |
@Nullable Long |
getRecoveryBy() |
long |
getStartTime() |
boolean |
isActive() |
boolean |
isBeingRecovered() |
boolean |
isBeingRecoveredBy(int clusterId)
Returns
true if the cluster node represented by this document
is currently being recovered by the given clusterId. |
boolean |
isRecoveryNeeded(long currentTimeMillis)
Check if _lastRev recovery is needed for cluster node info document.
|
String |
toString() |
public long getCreated()
public long getLeaseEndTime()
public long getStartTime()
-1 if not
available.public boolean isActive()
public boolean isBeingRecovered()
true if the recovery lock state is
ACQUIRED.public boolean isRecoveryNeeded(long currentTimeMillis)
true if both of the below conditions are true:
currentTimeMillis - the current time in milliseconds since the start
start of the epoch.public boolean isBeingRecoveredBy(int clusterId)
true if the cluster node represented by this document
is currently being recovered by the given clusterId.clusterId - the id of a cluster node.true if being recovered by the given id; false
otherwise.@Nullable public @Nullable Long getRecoveryBy()
null if
currently not set.public int getClusterId()
public static List<ClusterNodeInfoDocument> all(DocumentStore store)
store - the document store.public String getLastWrittenRootRev()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.