public static class ReplicaPlan.ForWrite extends ReplicaPlan.AbstractReplicaPlan<EndpointsForToken,ReplicaPlan.ForWrite>
ReplicaPlan.AbstractForRead<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E,P>>, ReplicaPlan.AbstractReplicaPlan<E extends Endpoints<E>,P extends ReplicaPlan<E,P>>, ReplicaPlan.ForPaxosWrite, ReplicaPlan.ForRangeRead, ReplicaPlan.ForRead<E extends Endpoints<E>,P extends ReplicaPlan.ForRead<E,P>>, ReplicaPlan.ForTokenRead, ReplicaPlan.ForWrite, ReplicaPlan.Shared<E extends Endpoints<E>,P extends ReplicaPlan<E,P>>, ReplicaPlan.SharedForRangeRead, ReplicaPlan.SharedForTokenRead
consistencyLevel, keyspace, replicationStrategy
Constructor and Description |
---|
ForWrite(Keyspace keyspace,
AbstractReplicationStrategy replicationStrategy,
ConsistencyLevel consistencyLevel,
EndpointsForToken pending,
EndpointsForToken liveAndDown,
EndpointsForToken live,
EndpointsForToken contact) |
Modifier and Type | Method and Description |
---|---|
boolean |
isAlive(Replica replica)
Test liveness, consistent with the upfront analysis done for this operation (i.e.
|
EndpointsForToken |
live()
The live replicas present in liveAndDown, usually derived from FailureDetector.isReplicaAlive
|
EndpointsForToken |
liveAndDown()
Replicas that can participate in the write - this always includes all nodes (pending and natural) in all DCs, except for paxos LOCAL_QUORUM (which is local DC only)
|
EndpointsForToken |
liveUncontacted()
Calculate which live endpoints we could have contacted, but chose not to
|
Replica |
lookup(InetAddressAndPort endpoint) |
EndpointsForToken |
pending()
Replicas that a region of the ring is moving to; not yet ready to serve reads, but should receive writes
|
java.lang.String |
toString() |
ReplicaPlan.ForWrite |
withContacts(EndpointsForToken newContact) |
int |
writeQuorum() |
consistencyLevel, contacts, keyspace, replicationStrategy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
shared, shared
public ForWrite(Keyspace keyspace, AbstractReplicationStrategy replicationStrategy, ConsistencyLevel consistencyLevel, EndpointsForToken pending, EndpointsForToken liveAndDown, EndpointsForToken live, EndpointsForToken contact)
public int writeQuorum()
public EndpointsForToken pending()
public EndpointsForToken liveAndDown()
public EndpointsForToken live()
public EndpointsForToken liveUncontacted()
public boolean isAlive(Replica replica)
public Replica lookup(InetAddressAndPort endpoint)
public ReplicaPlan.ForWrite withContacts(EndpointsForToken newContact)
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2009- The Apache Software Foundation