Class AggregateBackupResponse
- java.lang.Object
-
- org.infinispan.remoting.transport.AggregateBackupResponse
-
- All Implemented Interfaces:
BackupResponse
public class AggregateBackupResponse extends Object implements BackupResponse
- Since:
- 5.2
- Author:
- Mircea Markus
-
-
Constructor Summary
Constructors Constructor Description AggregateBackupResponse(BackupResponse onePcResponse, BackupResponse twoPcResponse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Set<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.Map<String,Throwable>getFailedBackups()longgetSendTimeMillis()Return the time in millis when this operation was initiated.inthashCode()booleanisEmpty()booleanisSync(String siteName)voidnotifyAsyncAck(XSiteAsyncAckListener listener)InvokesXSiteAsyncAckListenerfor each ack received from an asynchronous cross site request.voidnotifyFinish(LongConsumer timeElapsedConsumer)Registers a listener that is notified when the cross-site request is finished.StringtoString()voidwaitForBackupToFinish()
-
-
-
Constructor Detail
-
AggregateBackupResponse
public AggregateBackupResponse(BackupResponse onePcResponse, BackupResponse twoPcResponse)
-
-
Method Detail
-
waitForBackupToFinish
public void waitForBackupToFinish() throws Exception- Specified by:
waitForBackupToFinishin interfaceBackupResponse- Throws:
Exception
-
getFailedBackups
public Map<String,Throwable> getFailedBackups()
- Specified by:
getFailedBackupsin interfaceBackupResponse
-
getCommunicationErrors
public Set<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(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.
-
notifyAsyncAck
public void notifyAsyncAck(XSiteAsyncAckListener listener)
Description copied from interface:BackupResponseInvokesXSiteAsyncAckListenerfor 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:
notifyAsyncAckin interfaceBackupResponse
-
isSync
public boolean isSync(String siteName)
- Specified by:
isSyncin interfaceBackupResponse- Returns:
trueif the request for the remote site is synchronous.
-
-