public class PaxosCleanupSession extends AsyncFuture<java.lang.Void> implements java.lang.Runnable, IEndpointStateChangeSubscriber, IFailureDetectionEventListener, RequestCallbackWithFailure<java.lang.Void>
Awaitable.AbstractAwaitable, Awaitable.AsyncAwaitable, Awaitable.Defaults, Awaitable.SyncAwaitable
CANCELLED, UNCANCELLABLE, UNSET
Modifier and Type | Method and 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 happens
|
void |
onJoin(InetAddressAndPort endpoint,
EndpointState epState)
Use to inform interested parties about the change in the state
for specified endpoint
|
void |
onRemove(InetAddressAndPort endpoint) |
void |
onResponse(Message<java.lang.Void> msg) |
void |
onRestart(InetAddressAndPort endpoint,
EndpointState state)
Called whenever a node is restarted.
|
void |
run() |
await, awaitUntil, flatMap, map
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
invokeOnFailure
trackLatencyForSnitch
await, awaitUninterruptibly, flatMap, rethrowIfFailed, sync, syncThrowUncheckedOnInterrupt, syncUninterruptibly
public void run()
run
in interface java.lang.Runnable
public static void finishSession(InetAddressAndPort from, PaxosCleanupResponse response)
public void onJoin(InetAddressAndPort endpoint, EndpointState epState)
IEndpointStateChangeSubscriber
onJoin
in interface IEndpointStateChangeSubscriber
endpoint
- endpoint for which the state change occurred.epState
- state that actually changed for the above endpoint.public void beforeChange(InetAddressAndPort endpoint, EndpointState currentState, ApplicationState newStateKey, VersionedValue newValue)
beforeChange
in interface IEndpointStateChangeSubscriber
public void onChange(InetAddressAndPort endpoint, ApplicationState state, VersionedValue value)
onChange
in interface IEndpointStateChangeSubscriber
public void onAlive(InetAddressAndPort endpoint, EndpointState state)
onAlive
in interface IEndpointStateChangeSubscriber
public void onDead(InetAddressAndPort endpoint, EndpointState state)
onDead
in interface IEndpointStateChangeSubscriber
public void onRemove(InetAddressAndPort endpoint)
onRemove
in interface IEndpointStateChangeSubscriber
public void onRestart(InetAddressAndPort endpoint, EndpointState state)
IEndpointStateChangeSubscriber
state.isAlive() == false
as state
is from before the restarted node is marked up.onRestart
in interface IEndpointStateChangeSubscriber
public void convict(InetAddressAndPort ep, double phi)
IFailureDetectionEventListener
convict
in interface IFailureDetectionEventListener
ep
- endpoint to be convictedphi
- the value of phi with with ep was convictedpublic void onFailure(InetAddressAndPort from, RequestFailureReason reason)
RequestCallbackWithFailure
onFailure
in interface RequestCallback<java.lang.Void>
onFailure
in interface RequestCallbackWithFailure<java.lang.Void>
public void onResponse(Message<java.lang.Void> msg)
onResponse
in interface RequestCallback<java.lang.Void>
msg
- response received.Copyright © 2009- The Apache Software Foundation