| Modifier | Constructor and Description |
|---|---|
protected |
AbstractDelegatingTransport(Transport actual) |
| Modifier and Type | Method and Description |
|---|---|
BackupResponse |
backupRemotely(Collection<XSiteBackup> backups,
XSiteReplicateCommand rpcCommand) |
XSiteResponse |
backupRemotely(XSiteBackup backup,
XSiteReplicateCommand rpcCommand)
Sends a cross-site request to a remote site.
|
void |
checkCrossSiteAvailable()
Checks if this
Transport is able to perform cross-site requests. |
Address |
getAddress()
Retrieves the current cache instance's network address
|
Address |
getCoordinator() |
Transport |
getDelegate() |
Log |
getLog() |
List<Address> |
getMembers()
Returns a list of members in the current cluster view.
|
List<Address> |
getMembersPhysicalAddresses()
Returns physical addresses of members in the current cluster view.
|
List<Address> |
getPhysicalAddresses()
Retrieves the current cache instance's physical network addresses.
|
Set<String> |
getSitesView()
Get the view of interconnected sites.
|
int |
getViewId() |
<T> CompletionStage<T> |
invokeCommand(Address target,
ReplicableCommand command,
ResponseCollector<T> collector,
DeliverOrder deliverOrder,
long timeout,
TimeUnit unit)
Invoke a command on a single node and pass the response to a
ResponseCollector. |
<T> CompletionStage<T> |
invokeCommand(Collection<Address> targets,
ReplicableCommand command,
ResponseCollector<T> collector,
DeliverOrder deliverOrder,
long timeout,
TimeUnit unit)
Invoke a command on a collection of node and pass the responses to a
ResponseCollector. |
<T> CompletionStage<T> |
invokeCommandOnAll(ReplicableCommand command,
ResponseCollector<T> collector,
DeliverOrder deliverOrder,
long timeout,
TimeUnit unit)
Invoke a command on all the nodes in the cluster and pass the responses to a
ResponseCollector. |
<T> CompletionStage<T> |
invokeCommands(Collection<Address> targets,
Function<Address,ReplicableCommand> commandGenerator,
ResponseCollector<T> collector,
DeliverOrder deliverOrder,
long timeout,
TimeUnit timeUnit)
Invoke different commands on a collection of nodes and pass the responses to a
ResponseCollector. |
<T> CompletionStage<T> |
invokeCommandStaggered(Collection<Address> targets,
ReplicableCommand command,
ResponseCollector<T> collector,
DeliverOrder deliverOrder,
long timeout,
TimeUnit unit)
Invoke a command on a collection of nodes and pass the responses to a
ResponseCollector. |
Map<Address,Response> |
invokeRemotely(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
ResponseFilter responseFilter,
DeliverOrder deliverOrder,
boolean anycast)
Deprecated.
|
Map<Address,Response> |
invokeRemotely(Map<Address,ReplicableCommand> rpcCommands,
ResponseMode mode,
long timeout,
boolean usePriorityQueue,
ResponseFilter responseFilter,
boolean totalOrder,
boolean anycast)
Deprecated.
|
Map<Address,Response> |
invokeRemotely(Map<Address,ReplicableCommand> rpcCommands,
ResponseMode mode,
long timeout,
ResponseFilter responseFilter,
DeliverOrder deliverOrder,
boolean anycast)
Deprecated.
|
CompletableFuture<Map<Address,Response>> |
invokeRemotelyAsync(Collection<Address> recipients,
ReplicableCommand rpcCommand,
ResponseMode mode,
long timeout,
ResponseFilter responseFilter,
DeliverOrder deliverOrder,
boolean anycast) |
boolean |
isCoordinator() |
boolean |
isMulticastCapable()
Tests whether the transport supports true multicast
|
String |
localSiteName() |
void |
sendTo(Address destination,
ReplicableCommand rpcCommand,
DeliverOrder deliverOrder)
Asynchronously sends the
ReplicableCommand to the destination using the specified DeliverOrder. |
void |
sendToAll(ReplicableCommand rpcCommand,
DeliverOrder deliverOrder)
Asynchronously sends the
ReplicableCommand to the entire cluster. |
void |
sendToMany(Collection<Address> destinations,
ReplicableCommand rpcCommand,
DeliverOrder deliverOrder)
Asynchronously sends the
ReplicableCommand to the set of destination using the specified DeliverOrder. |
void |
start()
Invoked on component start
|
void |
stop()
Invoked on component stop
|
void |
waitForView(int viewId)
Deprecated.
|
CompletableFuture<Void> |
withView(int expectedViewId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcheckTotalOrderSupported, invokeCommandOnAll, invokeCommandsprotected final Transport actual
protected AbstractDelegatingTransport(Transport actual)
@Deprecated public Map<Address,Response> invokeRemotely(Collection<Address> recipients, ReplicableCommand rpcCommand, ResponseMode mode, long timeout, ResponseFilter responseFilter, DeliverOrder deliverOrder, boolean anycast) throws Exception
TransportinvokeRemotely in interface Transportrecipients - 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. implementations.responseFilter - a response filter with which to filter out failed/unwanted/invalid responses.deliverOrder - the DeliverOrder.anycast - used when is true, it means that it must use TOA instead of
TOB.Exception - in the event of problems.@Deprecated public Map<Address,Response> invokeRemotely(Map<Address,ReplicableCommand> rpcCommands, ResponseMode mode, long timeout, boolean usePriorityQueue, ResponseFilter responseFilter, boolean totalOrder, boolean anycast) throws Exception
invokeRemotely in interface TransportException@Deprecated public Map<Address,Response> invokeRemotely(Map<Address,ReplicableCommand> rpcCommands, ResponseMode mode, long timeout, ResponseFilter responseFilter, DeliverOrder deliverOrder, boolean anycast) throws Exception
invokeRemotely in interface TransportExceptionpublic CompletableFuture<Map<Address,Response>> invokeRemotelyAsync(Collection<Address> recipients, ReplicableCommand rpcCommand, ResponseMode mode, long timeout, ResponseFilter responseFilter, DeliverOrder deliverOrder, boolean anycast) throws Exception
invokeRemotelyAsync in interface TransportExceptionpublic void sendTo(Address destination, ReplicableCommand rpcCommand, DeliverOrder deliverOrder) throws Exception
TransportReplicableCommand to the destination using the specified DeliverOrder.sendTo in interface Transportdestination - the destination's Address.rpcCommand - the ReplicableCommand to send.deliverOrder - the DeliverOrder to use.Exception - if there was problem sending the request.public void sendToMany(Collection<Address> destinations, ReplicableCommand rpcCommand, DeliverOrder deliverOrder) throws Exception
TransportReplicableCommand to the set of destination using the specified DeliverOrder.sendToMany in interface Transportdestinations - the collection of destination's Address. If null, it sends to all the members
in the cluster.rpcCommand - the ReplicableCommand to send.deliverOrder - the DeliverOrder to use.Exception - if there was problem sending the request.public void sendToAll(ReplicableCommand rpcCommand, DeliverOrder deliverOrder) throws Exception
TransportReplicableCommand to the entire cluster.public BackupResponse backupRemotely(Collection<XSiteBackup> backups, XSiteReplicateCommand rpcCommand) throws Exception
backupRemotely in interface TransportExceptionpublic XSiteResponse backupRemotely(XSiteBackup backup, XSiteReplicateCommand rpcCommand)
Transport
Currently, no reply values are supported. Or the request completes successfully or it throws an Exception.
If XSiteBackup.isSync() returns false, the XSiteResponse is only completed when the an
ACK from the remote site is received. The invoker needs to make sure not to wait for the XSiteResponse.
backupRemotely in interface Transportbackup - The remote site.rpcCommand - The command to send.XSiteResponse that is completed when the request is completed.public boolean isCoordinator()
isCoordinator in interface Transportpublic Address getCoordinator()
getCoordinator in interface Transportpublic Address getAddress()
TransportgetAddress in interface Transportpublic List<Address> getPhysicalAddresses()
TransportTransport.getAddress().getPhysicalAddresses in interface Transportpublic List<Address> getMembers()
TransportgetMembers in interface Transportpublic List<Address> getMembersPhysicalAddresses()
TransportgetMembersPhysicalAddresses in interface Transportpublic boolean isMulticastCapable()
TransportisMulticastCapable in interface Transportpublic void checkCrossSiteAvailable()
throws CacheConfigurationException
TransportTransport is able to perform cross-site requests.checkCrossSiteAvailable in interface TransportCacheConfigurationException - if cross-site isn't available.public String localSiteName()
localSiteName in interface Transportnull if this Transport cannot make cross-site requests.public void start()
Lifecyclepublic void stop()
Lifecyclepublic CompletableFuture<Void> withView(int expectedViewId)
withView in interface TransportCompletableFuture that completes when the transport has installed the expected view.@Deprecated public void waitForView(int viewId) throws InterruptedException
waitForView in interface TransportInterruptedExceptionpublic Transport getDelegate()
public Set<String> getSitesView()
TransportgetSitesView in interface Transportpublic <T> CompletionStage<T> invokeCommand(Address target, ReplicableCommand command, ResponseCollector<T> collector, DeliverOrder deliverOrder, long timeout, TimeUnit unit)
TransportResponseCollector.
If the target is the local node, the command is never executed and ResponseCollector.finish() is called directly.
invokeCommand in interface Transportpublic <T> CompletionStage<T> invokeCommand(Collection<Address> targets, ReplicableCommand command, ResponseCollector<T> collector, DeliverOrder deliverOrder, long timeout, TimeUnit unit)
TransportResponseCollector.
If one of the targets is the local node, it is ignored. The command is only executed on the remote nodes.
invokeCommand in interface Transportpublic <T> CompletionStage<T> invokeCommandOnAll(ReplicableCommand command, ResponseCollector<T> collector, DeliverOrder deliverOrder, long timeout, TimeUnit unit)
TransportResponseCollector.
The command is not executed locally and it is not sent across RELAY2 bridges to remote sites.
invokeCommandOnAll in interface Transportpublic <T> CompletionStage<T> invokeCommandStaggered(Collection<Address> targets, ReplicableCommand command, ResponseCollector<T> collector, DeliverOrder deliverOrder, long timeout, TimeUnit unit)
TransportResponseCollector.
The command is only sent immediately to the first target, and there is an implementation-dependent
delay before sending the command to each target. There is no delay if the target responds or leaves
the cluster. The remaining targets are skipped if ResponseCollector.addResponse(Address, Response)
returns a non-null value.
The command is only executed on the remote nodes.
invokeCommandStaggered in interface Transportpublic <T> CompletionStage<T> invokeCommands(Collection<Address> targets, Function<Address,ReplicableCommand> commandGenerator, ResponseCollector<T> collector, DeliverOrder deliverOrder, long timeout, TimeUnit timeUnit)
TransportResponseCollector.
The command is only executed on the remote nodes.
invokeCommands in interface TransportCopyright © 2022 JBoss by Red Hat. All rights reserved.