Class PaxosCleanupSession
- java.lang.Object
-
- org.apache.cassandra.utils.concurrent.AbstractFuture<V>
-
- org.apache.cassandra.utils.concurrent.AsyncFuture<java.lang.Void>
-
- org.apache.cassandra.service.paxos.cleanup.PaxosCleanupSession
-
- All Implemented Interfaces:
com.google.common.util.concurrent.ListenableFuture<java.lang.Void>
,io.netty.util.concurrent.Future<java.lang.Void>
,java.lang.Runnable
,java.util.concurrent.Future<java.lang.Void>
,IEndpointStateChangeSubscriber
,IFailureDetectionEventListener
,RequestCallback<java.lang.Void>
,RequestCallbackWithFailure<java.lang.Void>
,Awaitable
,Future<java.lang.Void>
public class PaxosCleanupSession extends AsyncFuture<java.lang.Void> implements java.lang.Runnable, IEndpointStateChangeSubscriber, IFailureDetectionEventListener, RequestCallbackWithFailure<java.lang.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
-
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 void
beforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue)
void
convict(InetAddressAndPort ep, double phi)
Convict the specified endpoint.static void
finishSession(InetAddressAndPort from, PaxosCleanupResponse response)
void
onAlive(InetAddressAndPort endpoint, EndpointState state)
void
onChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value)
void
onDead(InetAddressAndPort endpoint, EndpointState state)
void
onFailure(InetAddressAndPort from, RequestFailureReason reason)
Called when there is an exception on the remote node or timeout happensvoid
onJoin(InetAddressAndPort endpoint, EndpointState epState)
Use to inform interested parties about the change in the state for specified endpointvoid
onRemove(InetAddressAndPort endpoint)
void
onResponse(Message<java.lang.Void> msg)
void
onRestart(InetAddressAndPort endpoint, EndpointState state)
Called whenever a node is restarted.void
run()
-
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
-
-
-
-
Method Detail
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
finishSession
public static void finishSession(InetAddressAndPort from, PaxosCleanupResponse response)
-
onJoin
public void onJoin(InetAddressAndPort endpoint, EndpointState epState)
Description copied from interface:IEndpointStateChangeSubscriber
Use to inform interested parties about the change in the state for specified endpoint- Specified by:
onJoin
in 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:
beforeChange
in interfaceIEndpointStateChangeSubscriber
-
onChange
public void onChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value)
- Specified by:
onChange
in interfaceIEndpointStateChangeSubscriber
-
onAlive
public void onAlive(InetAddressAndPort endpoint, EndpointState state)
- Specified by:
onAlive
in interfaceIEndpointStateChangeSubscriber
-
onDead
public void onDead(InetAddressAndPort endpoint, EndpointState state)
- Specified by:
onDead
in interfaceIEndpointStateChangeSubscriber
-
onRemove
public void onRemove(InetAddressAndPort endpoint)
- Specified by:
onRemove
in interfaceIEndpointStateChangeSubscriber
-
onRestart
public void onRestart(InetAddressAndPort endpoint, EndpointState state)
Description copied from interface:IEndpointStateChangeSubscriber
Called 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() == false
asstate
is from before the restarted node is marked up.- Specified by:
onRestart
in interfaceIEndpointStateChangeSubscriber
-
convict
public void convict(InetAddressAndPort ep, double phi)
Description copied from interface:IFailureDetectionEventListener
Convict the specified endpoint.- Specified by:
convict
in interfaceIFailureDetectionEventListener
- Parameters:
ep
- endpoint to be convictedphi
- the value of phi with with ep was convicted
-
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<java.lang.Void>
- Specified by:
onFailure
in interfaceRequestCallbackWithFailure<java.lang.Void>
-
onResponse
public void onResponse(Message<java.lang.Void> msg)
- Specified by:
onResponse
in interfaceRequestCallback<java.lang.Void>
- Parameters:
msg
- response received.
-
-