Class PaxosStartPrepareCleanup
- java.lang.Object
-
- org.apache.cassandra.utils.concurrent.AbstractFuture<V>
-
- org.apache.cassandra.utils.concurrent.AsyncFuture<PaxosCleanupHistory>
-
- org.apache.cassandra.service.paxos.cleanup.PaxosStartPrepareCleanup
-
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<PaxosCleanupHistory>
,io.netty.util.concurrent.Future<PaxosCleanupHistory>
,java.util.concurrent.Future<PaxosCleanupHistory>
,RequestCallback<PaxosCleanupHistory>
,RequestCallbackWithFailure<PaxosCleanupHistory>
,Awaitable
,Future<PaxosCleanupHistory>
public class PaxosStartPrepareCleanup extends AsyncFuture<PaxosCleanupHistory> implements RequestCallbackWithFailure<PaxosCleanupHistory>
Determines the highest ballot we should attempt to repair
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PaxosStartPrepareCleanup.Request
static class
PaxosStartPrepareCleanup.RequestSerializer
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Awaitable
Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable
-
-
Field Summary
Fields Modifier and Type Field Description static PaxosStartPrepareCleanup.RequestSerializer
serializer
static IVerbHandler<PaxosStartPrepareCleanup.Request>
verbHandler
-
Fields inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
CANCELLED, UNCANCELLABLE, UNSET
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IVerbHandler<PaxosStartPrepareCleanup.Request>
createVerbHandler(SharedContext ctx)
void
onFailure(InetAddressAndPort from, RequestFailureReason reason)
Called when there is an exception on the remote node or timeout happensvoid
onResponse(Message<PaxosCleanupHistory> msg)
static PaxosStartPrepareCleanup
prepare(SharedContext ctx, TableId tableId, java.util.Collection<InetAddressAndPort> endpoints, EndpointState localEpState, java.util.Collection<Range<Token>> ranges)
We run paxos repair as part of topology changes, so we include the local endpoint state in the paxos repair prepare message to prevent racing with gossip dissemination and guarantee that every repair participant is aware of the pending ring change during repair.-
Methods inherited from class org.apache.cassandra.utils.concurrent.AsyncFuture
await, awaitUntil, flatMap, map
-
Methods inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
addCallback, addCallback, addCallback, addCallback, addCallback, addCallback, addListener, addListener, addListener, addListeners, await, awaitThrowUncheckedOnInterrupt, awaitThrowUncheckedOnInterrupt, awaitUninterruptibly, awaitUninterruptibly, awaitUntilThrowUncheckedOnInterrupt, awaitUntilUninterruptibly, cancel, cause, description, flatMap, get, get, getNow, getWhenDone, isCancellable, isCancelled, isDone, isSuccess, isUncancellable, map, map, notifyExecutor, removeListener, removeListeners, setUncancellable, setUncancellableExclusive, toString, tryFailure, trySuccess
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.cassandra.utils.concurrent.Future
await, awaitUninterruptibly, flatMap, rethrowIfFailed, sync, syncThrowUncheckedOnInterrupt, syncUninterruptibly
-
Methods inherited from interface org.apache.cassandra.net.RequestCallback
trackLatencyForSnitch
-
Methods inherited from interface org.apache.cassandra.net.RequestCallbackWithFailure
invokeOnFailure
-
-
-
-
Field Detail
-
serializer
public static final PaxosStartPrepareCleanup.RequestSerializer serializer
-
verbHandler
public static final IVerbHandler<PaxosStartPrepareCleanup.Request> verbHandler
-
-
Method Detail
-
prepare
public static PaxosStartPrepareCleanup prepare(SharedContext ctx, TableId tableId, java.util.Collection<InetAddressAndPort> endpoints, EndpointState localEpState, java.util.Collection<Range<Token>> ranges)
We run paxos repair as part of topology changes, so we include the local endpoint state in the paxos repair prepare message to prevent racing with gossip dissemination and guarantee that every repair participant is aware of the pending ring change during repair.
-
onFailure
public void onFailure(InetAddressAndPort from, RequestFailureReason reason)
Description copied from interface:RequestCallbackWithFailure
Called when there is an exception on the remote node or timeout happens- Specified by:
onFailure
in interfaceRequestCallback<PaxosCleanupHistory>
- Specified by:
onFailure
in interfaceRequestCallbackWithFailure<PaxosCleanupHistory>
-
onResponse
public void onResponse(Message<PaxosCleanupHistory> msg)
- Specified by:
onResponse
in interfaceRequestCallback<PaxosCleanupHistory>
- Parameters:
msg
- response received.
-
createVerbHandler
public static IVerbHandler<PaxosStartPrepareCleanup.Request> createVerbHandler(SharedContext ctx)
-
-