public final class ReplicaInfo extends Object
Constructor and Description |
---|
ReplicaInfo(long term,
NodeId master,
List<NodeId> backups)
Creates a ReplicaInfo instance.
|
Modifier and Type | Method and Description |
---|---|
List<NodeId> |
backups()
Returns the collection of NodeId, where backup copies should be placed.
|
boolean |
equals(Object other) |
int |
hashCode() |
Optional<NodeId> |
master()
Returns the NodeId, if there is a Node where the master copy should be.
|
long |
term()
Returns the mastership term.
|
public ReplicaInfo(long term, NodeId master, List<NodeId> backups)
term
- monotonically increasing unique mastership termmaster
- NodeId of the node where the master copy should bebackups
- list of NodeId, where backup copies should be placedpublic long term()
public Optional<NodeId> master()
public List<NodeId> backups()