Class JGroupsBackupResponse
- java.lang.Object
-
- org.infinispan.remoting.transport.jgroups.JGroupsBackupResponse
-
- All Implemented Interfaces:
BackupResponse
public class JGroupsBackupResponse extends java.lang.Object implements BackupResponse
- Since:
- 5.2
- Author:
- Mircea Markus
-
-
Constructor Summary
Constructors Constructor Description JGroupsBackupResponse(java.util.Map<XSiteBackup,java.util.concurrent.Future<ValidResponse>> syncBackupCalls, TimeService timeService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<java.lang.String>getCommunicationErrors()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.java.util.Map<java.lang.String,java.lang.Throwable>getFailedBackups()longgetSendTimeMillis()Return the time in millis when this operation was initiated.booleanisEmpty()voidnotifyFinish(java.util.function.LongConsumer timeElapsedConsumer)Registers a listener that is notified when the cross-site request is finished.java.lang.StringtoString()voidwaitForBackupToFinish()
-
-
-
Constructor Detail
-
JGroupsBackupResponse
public JGroupsBackupResponse(java.util.Map<XSiteBackup,java.util.concurrent.Future<ValidResponse>> syncBackupCalls, TimeService timeService)
-
-
Method Detail
-
waitForBackupToFinish
public void waitForBackupToFinish() throws java.lang.Exception- Specified by:
waitForBackupToFinishin interfaceBackupResponse- Throws:
java.lang.Exception
-
getCommunicationErrors
public java.util.Set<java.lang.String> getCommunicationErrors()
Description copied from interface:BackupResponseReturns 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:
getCommunicationErrorsin interfaceBackupResponse
-
getSendTimeMillis
public long getSendTimeMillis()
Description copied from interface:BackupResponseReturn the time in millis when this operation was initiated.- Specified by:
getSendTimeMillisin interfaceBackupResponse
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceBackupResponse
-
notifyFinish
public void notifyFinish(java.util.function.LongConsumer timeElapsedConsumer)
Description copied from interface:BackupResponseRegisters 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:
notifyFinishin interfaceBackupResponse- Parameters:
timeElapsedConsumer- TheConsumerto be invoke.
-
getFailedBackups
public java.util.Map<java.lang.String,java.lang.Throwable> getFailedBackups()
- Specified by:
getFailedBackupsin interfaceBackupResponse
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-