public abstract class AbstractStreamSession extends java.lang.Object implements IEndpointStateChangeSubscriber, IFailureDetectionEventListener
| Modifier and Type | Field and Description |
|---|---|
protected IStreamCallback |
callback |
protected java.net.InetAddress |
host |
protected java.util.UUID |
sessionId |
protected java.lang.String |
table |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractStreamSession(java.lang.String table,
java.net.InetAddress host,
java.util.UUID sessionId,
IStreamCallback callback) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(boolean success) |
protected abstract void |
closeInternal(boolean success) |
void |
convict(java.net.InetAddress endpoint,
double phi)
Convict the specified endpoint.
|
java.net.InetAddress |
getHost() |
java.util.UUID |
getSessionId() |
void |
onAlive(java.net.InetAddress endpoint,
EndpointState state) |
void |
onChange(java.net.InetAddress endpoint,
ApplicationState state,
VersionedValue value) |
void |
onDead(java.net.InetAddress endpoint,
EndpointState state) |
void |
onJoin(java.net.InetAddress endpoint,
EndpointState epState)
Use to inform interested parties about the change in the state
for specified endpoint
|
void |
onRemove(java.net.InetAddress endpoint) |
void |
onRestart(java.net.InetAddress endpoint,
EndpointState epState)
Called whenever a node is restarted.
|
protected final java.net.InetAddress host
protected final java.util.UUID sessionId
protected java.lang.String table
protected final IStreamCallback callback
protected AbstractStreamSession(java.lang.String table,
java.net.InetAddress host,
java.util.UUID sessionId,
IStreamCallback callback)
public java.util.UUID getSessionId()
public java.net.InetAddress getHost()
public void close(boolean success)
protected abstract void closeInternal(boolean success)
public void onJoin(java.net.InetAddress endpoint,
EndpointState epState)
IEndpointStateChangeSubscriberonJoin in interface IEndpointStateChangeSubscriberendpoint - endpoint for which the state change occurred.epState - state that actually changed for the above endpoint.public void onChange(java.net.InetAddress endpoint,
ApplicationState state,
VersionedValue value)
onChange in interface IEndpointStateChangeSubscriberpublic void onAlive(java.net.InetAddress endpoint,
EndpointState state)
onAlive in interface IEndpointStateChangeSubscriberpublic void onDead(java.net.InetAddress endpoint,
EndpointState state)
onDead in interface IEndpointStateChangeSubscriberpublic void onRemove(java.net.InetAddress endpoint)
onRemove in interface IEndpointStateChangeSubscriberpublic void onRestart(java.net.InetAddress endpoint,
EndpointState epState)
IEndpointStateChangeSubscriberstate.isAlive() == false
as state is from before the restarted node is marked up.onRestart in interface IEndpointStateChangeSubscriberpublic void convict(java.net.InetAddress endpoint,
double phi)
IFailureDetectionEventListenerconvict in interface IFailureDetectionEventListenerendpoint - endpoint to be convictedphi - the value of phi with with ep was convictedCopyright © 2014 The Apache Software Foundation