|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Transport
An interface that provides a communication link with remote caches. Also allows remote caches to invoke commands on this cache instance.
| Method Summary | |
|---|---|
Address |
getAddress()
Retrieves the current cache instance's network address |
Address |
getCoordinator()
|
DistributedSync |
getDistributedSync()
|
List<Address> |
getMembers()
Returns a list of members in the current cluster view. |
List<Address> |
getPhysicalAddresses()
Retrieves the current cache instance's physical network addresses. |
int |
getViewId()
|
void |
initialize(GlobalConfiguration c,
StreamingMarshaller marshaller,
ExecutorService asyncExecutor,
InboundInvocationHandler handler,
CacheManagerNotifier notifier)
Initializes the transport with global cache configuration and transport-specific properties. |
List<Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue,
ResponseFilter responseFilter,
boolean supportReplay)
Invokes an RPC call on other caches in the cluster. |
boolean |
isCoordinator()
|
boolean |
isSupportStateTransfer()
Tests whether the transport supports state transfer |
boolean |
retrieveState(String cacheName,
Address address,
long timeout)
Initiates a state retrieval from a specific cache (by typically invoking InboundInvocationHandler.generateState(String, java.io.OutputStream)), and applies this
state to the current cache via the InboundInvocationHandler.applyState(String, java.io.InputStream)
callback. |
void |
start()
|
void |
stop()
|
| Method Detail |
|---|
void initialize(GlobalConfiguration c,
StreamingMarshaller marshaller,
ExecutorService asyncExecutor,
InboundInvocationHandler handler,
CacheManagerNotifier notifier)
c - global cache-wide configurationmarshaller - marshaller to use for marshalling and unmarshallingasyncExecutor - executor to use for asynchronous callshandler - handler for invoking remotely originating calls on the local cachenotifier - notifier to use
List<Response> invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
boolean usePriorityQueue,
ResponseFilter responseFilter,
boolean supportReplay)
throws Exception
recipients - a list of Addresses to invoke the call on. If this is null, the call is broadcast to the
entire cluster.rpcCommand - the cache command to invokemode - the response mode to usetimeout - a timeout after which to throw a replication exception.usePriorityQueue - if true, a priority queue is used to deliver messages. May not be supported by all
implementations.responseFilter - a response filter with which to filter out failed/unwanted/invalid responses.supportReplay - whether replays of missed messages is supported
Exception - in the event of problems.boolean isCoordinator()
Address getCoordinator()
Address getAddress()
List<Address> getPhysicalAddresses()
getAddress().
List<Address> getMembers()
boolean retrieveState(String cacheName,
Address address,
long timeout)
throws StateTransferException
InboundInvocationHandler.generateState(String, java.io.OutputStream)), and applies this
state to the current cache via the InboundInvocationHandler.applyState(String, java.io.InputStream)
callback.
cacheName - name of cache for which to retrieve stateaddress - address of remote cache from which to retrieve statetimeout - state retrieval timeout in milliseconds
StateTransferException - if state cannot be retrieved from the specific cacheDistributedSync getDistributedSync()
boolean isSupportStateTransfer()
void start()
start in interface Lifecyclevoid stop()
stop in interface Lifecycleint getViewId()
|
Google Analytics | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||