Class PaxosCleanupSession
java.lang.Object
org.apache.cassandra.utils.concurrent.AbstractFuture<V>
org.apache.cassandra.utils.concurrent.AsyncFuture<Void>
org.apache.cassandra.service.paxos.cleanup.PaxosCleanupSession
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<Void>,io.netty.util.concurrent.Future<Void>,Runnable,Future<Void>,IEndpointStateChangeSubscriber,IFailureDetectionEventListener,RequestCallback<Void>,RequestCallbackWithFailure<Void>,Awaitable,Future<Void>
public class PaxosCleanupSession
extends AsyncFuture<Void>
implements Runnable, IEndpointStateChangeSubscriber, IFailureDetectionEventListener, RequestCallbackWithFailure<Void>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.concurrent.Awaitable
Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable -
Field Summary
FieldsFields inherited from class org.apache.cassandra.utils.concurrent.AbstractFuture
CANCELLED, UNCANCELLABLE, UNSET -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue) voidconvict(InetAddressAndPort ep, double phi) Convict the specified endpoint.voidonAlive(InetAddressAndPort endpoint, EndpointState state) voidonChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value) voidonDead(InetAddressAndPort endpoint, EndpointState state) voidonFailure(InetAddressAndPort from, RequestFailureReason reason) Called when there is an exception on the remote node or timeout happensvoidonJoin(InetAddressAndPort endpoint, EndpointState epState) Use to inform interested parties about the change in the state for specified endpointvoidonRemove(InetAddressAndPort endpoint) voidonResponse(Message<Void> msg) voidonRestart(InetAddressAndPort endpoint, EndpointState state) Called whenever a node is restarted.voidrun()Methods inherited from class org.apache.cassandra.utils.concurrent.AsyncFuture
await, awaitUntil, flatMap, mapMethods 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, trySuccessMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.cassandra.utils.concurrent.Future
await, awaitUninterruptibly, flatMap, rethrowIfFailed, sync, syncThrowUncheckedOnInterrupt, syncUninterruptiblyMethods inherited from interface org.apache.cassandra.net.RequestCallback
trackLatencyForSnitchMethods inherited from interface org.apache.cassandra.net.RequestCallbackWithFailure
invokeOnFailure
-
Field Details
-
session
-
-
Method Details
-
run
public void run() -
onJoin
Description copied from interface:IEndpointStateChangeSubscriberUse to inform interested parties about the change in the state for specified endpoint- Specified by:
onJoinin interfaceIEndpointStateChangeSubscriber- Parameters:
endpoint- endpoint for which the state change occurred.epState- state that actually changed for the above endpoint.
-
beforeChange
public void beforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue) - Specified by:
beforeChangein interfaceIEndpointStateChangeSubscriber
-
onChange
- Specified by:
onChangein interfaceIEndpointStateChangeSubscriber
-
onAlive
- Specified by:
onAlivein interfaceIEndpointStateChangeSubscriber
-
onDead
- Specified by:
onDeadin interfaceIEndpointStateChangeSubscriber
-
onRemove
- Specified by:
onRemovein interfaceIEndpointStateChangeSubscriber
-
onRestart
Description copied from interface:IEndpointStateChangeSubscriberCalled whenever a node is restarted. Note that there is no guarantee when that happens that the node was previously marked down. It will have only ifstate.isAlive() == falseasstateis from before the restarted node is marked up.- Specified by:
onRestartin interfaceIEndpointStateChangeSubscriber
-
convict
Description copied from interface:IFailureDetectionEventListenerConvict the specified endpoint.- Specified by:
convictin interfaceIFailureDetectionEventListener- Parameters:
ep- endpoint to be convictedphi- the value of phi with with ep was convicted
-
onFailure
Description copied from interface:RequestCallbackWithFailureCalled when there is an exception on the remote node or timeout happens- Specified by:
onFailurein interfaceRequestCallback<Void>- Specified by:
onFailurein interfaceRequestCallbackWithFailure<Void>
-
onResponse
- Specified by:
onResponsein interfaceRequestCallback<Void>- Parameters:
msg- response received.
-