Class CoordinatorSession
- java.lang.Object
-
- org.apache.cassandra.repair.consistent.ConsistentSession
-
- org.apache.cassandra.repair.consistent.CoordinatorSession
-
public class CoordinatorSession extends ConsistentSession
Coordinator side logic and state of a consistent repair session. LikeActiveRepairService.ParentRepairSession, there is only oneCoordinatorSessionper user repair command, regardless of the number of tables and token ranges involved.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCoordinatorSession.Builder-
Nested classes/interfaces inherited from class org.apache.cassandra.repair.consistent.ConsistentSession
ConsistentSession.State
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.repair.consistent.ConsistentSession
coordinator, participants, ranges, repairedAt, sessionID, tableIds
-
-
Constructor Summary
Constructors Constructor Description CoordinatorSession(CoordinatorSession.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CoordinatorSession.Builderbuilder()com.google.common.util.concurrent.ListenableFutureexecute(java.util.function.Supplier<com.google.common.util.concurrent.ListenableFuture<java.util.List<RepairSessionResult>>> sessionSubmitter, java.util.concurrent.atomic.AtomicBoolean hasFailure)Runs the asynchronous consistent repair session.voidfail()voidfinalizeCommit()com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean>finalizePropose()voidhandleFinalizePromise(InetAddressAndPort participant, boolean success)voidhandlePrepareResponse(InetAddressAndPort participant, boolean success)com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean>prepare()protected voidsendMessage(InetAddressAndPort destination, Message<RepairMessage> message)voidsetParticipantState(InetAddressAndPort participant, ConsistentSession.State state)voidsetRepairing()voidsetState(ConsistentSession.State state)-
Methods inherited from class org.apache.cassandra.repair.consistent.ConsistentSession
equals, getState, hashCode, intersects, toString
-
-
-
-
Constructor Detail
-
CoordinatorSession
public CoordinatorSession(CoordinatorSession.Builder builder)
-
-
Method Detail
-
builder
public static CoordinatorSession.Builder builder()
-
setState
public void setState(ConsistentSession.State state)
- Overrides:
setStatein classConsistentSession
-
setParticipantState
public void setParticipantState(InetAddressAndPort participant, ConsistentSession.State state)
-
sendMessage
protected void sendMessage(InetAddressAndPort destination, Message<RepairMessage> message)
-
prepare
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> prepare()
-
handlePrepareResponse
public void handlePrepareResponse(InetAddressAndPort participant, boolean success)
-
setRepairing
public void setRepairing()
-
finalizePropose
public com.google.common.util.concurrent.ListenableFuture<java.lang.Boolean> finalizePropose()
-
handleFinalizePromise
public void handleFinalizePromise(InetAddressAndPort participant, boolean success)
-
finalizeCommit
public void finalizeCommit()
-
fail
public void fail()
-
execute
public com.google.common.util.concurrent.ListenableFuture execute(java.util.function.Supplier<com.google.common.util.concurrent.ListenableFuture<java.util.List<RepairSessionResult>>> sessionSubmitter, java.util.concurrent.atomic.AtomicBoolean hasFailure)
Runs the asynchronous consistent repair session. Actual repair sessions are scheduled via a submitter to make unit testing easier
-
-