Class JGroupsBackupResponse
java.lang.Object
org.infinispan.remoting.transport.jgroups.JGroupsBackupResponse
- All Implemented Interfaces:
BackupResponse
- Since:
- 5.2
- Author:
- Mircea Markus
-
Constructor Summary
ConstructorDescriptionJGroupsBackupResponse
(Map<org.infinispan.xsite.XSiteBackup, CompletableFuture<ValidResponse>> backupCalls, TimeService timeService) -
Method Summary
Modifier and TypeMethodDescriptionReturns the list of sites where the backups failed due to a bridge communication error (as opposed to an error caused by Infinispan, e.g.long
Return the time in millis when this operation was initiated.boolean
isEmpty()
boolean
void
notifyAsyncAck
(XSiteAsyncAckListener listener) InvokesXSiteAsyncAckListener
for each ack received from an asynchronous cross site request.void
notifyFinish
(LongConsumer timeElapsedConsumer) Registers a listener that is notified when the cross-site request is finished.toString()
void
-
Constructor Details
-
JGroupsBackupResponse
public JGroupsBackupResponse(Map<org.infinispan.xsite.XSiteBackup, CompletableFuture<ValidResponse>> backupCalls, TimeService timeService)
-
-
Method Details
-
waitForBackupToFinish
- Specified by:
waitForBackupToFinish
in interfaceBackupResponse
- Throws:
Exception
-
getCommunicationErrors
Description copied from interface:BackupResponse
Returns the list of sites where the backups failed due to a bridge communication error (as opposed to an error caused by Infinispan, e.g. due to a lock acquisition timeout).- Specified by:
getCommunicationErrors
in interfaceBackupResponse
-
getSendTimeMillis
public long getSendTimeMillis()Description copied from interface:BackupResponse
Return the time in millis when this operation was initiated.- Specified by:
getSendTimeMillis
in interfaceBackupResponse
-
isEmpty
public boolean isEmpty()- Specified by:
isEmpty
in interfaceBackupResponse
-
notifyFinish
Description copied from interface:BackupResponse
Registers a listener that is notified when the cross-site request is finished.The parameter is the time spent in the network in milliseconds.
- Specified by:
notifyFinish
in interfaceBackupResponse
- Parameters:
timeElapsedConsumer
- TheConsumer
to be invoke.
-
getFailedBackups
- Specified by:
getFailedBackups
in interfaceBackupResponse
-
toString
-
notifyAsyncAck
Description copied from interface:BackupResponse
InvokesXSiteAsyncAckListener
for each ack received from an asynchronous cross site request. If the request times-out or failed to be sent, the listeners receives a non-nullThrowable
.- Specified by:
notifyAsyncAck
in interfaceBackupResponse
-
isSync
- Specified by:
isSync
in interfaceBackupResponse
- Returns:
true
if the request for the remote site is synchronous.
-