public interface GroupStateTransferService extends GroupCommunicationService
All nodes that expect to be able to receive state
must also
register to provide state
.
StateTransferProvider
Modifier and Type | Method and Description |
---|---|
Future<SerializableStateTransferResult> |
getServiceState(String serviceName)
Gets the current service state from an existing member of the group.
|
Future<SerializableStateTransferResult> |
getServiceState(String serviceName,
ClassLoader classloader)
Gets the current service state from an existing member of the group, using the given classloader to deserialize it.
|
Future<StreamStateTransferResult> |
getServiceStateAsStream(String serviceName)
Gets an input stream from which can be read the current service state from an existing member of the group.
|
void |
registerStateTransferProvider(String serviceName,
StateTransferProvider provider)
Registers the object that can provide state for the service when newly joining group members request it.
|
void |
unregisterStateTransferProvider(String serviceName)
Unregisters the object that can provide state for the service.
|
getClusterNode, getClusterNodes, getCurrentViewId, getGroupName, getNodeName, isConsistentWith, isCoordinator
Future<SerializableStateTransferResult> getServiceState(String serviceName)
Equivalent to getServiceState(serviceName, null)
.
serviceName
- the name of the serviceFuture
whose get()
method will return the service state when it becomes
available.Future<SerializableStateTransferResult> getServiceState(String serviceName, ClassLoader classloader)
serviceName
- the name of the serviceclassloader
- the ClassLoader to use to deserialize the state when it becomes available. May be null
in
which case the GroupStateTransferService implementation class' classloader will be used.Future
whose get()
method will return the service state when it becomes
available.Future<StreamStateTransferResult> getServiceStateAsStream(String serviceName)
Equivalent to getServiceState(serviceName, null)
.
serviceName
- the name of the serviceFuture
whose get()
method will return the service state when it becomes
available.void registerStateTransferProvider(String serviceName, StateTransferProvider provider)
serviceName
- the name of the serviceprovider
- the state providervoid unregisterStateTransferProvider(String serviceName)
serviceName
- the name of the serviceCopyright © 2013 JBoss, a division of Red Hat, Inc.. All rights reserved.