Package org.infinispan.xsite
Interface BackupSender
-
- All Known Implementing Classes:
BackupSenderImpl,NoOpBackupSender
public interface BackupSenderComponent responsible with sending backup data to remote sites. The send operation is executed async, it's up to the caller to wait on the returnedBackupResponsein the case it wants an sync call.- Since:
- 5.2
- Author:
- Mircea Markus
- See Also:
BackupResponse
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classBackupSender.BringSiteOnlineResponsestatic classBackupSender.TakeSiteOfflineResponse
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BackupResponsebackupCommit(org.infinispan.commands.tx.CommitCommand command)BackupResponsebackupPrepare(org.infinispan.commands.tx.PrepareCommand command, org.infinispan.transaction.impl.AbstractCacheTransaction cacheTransaction)Prepares a transaction on the remote site.BackupResponsebackupRollback(org.infinispan.commands.tx.RollbackCommand command)BackupResponsebackupWrite(org.infinispan.commands.write.WriteCommand command)BackupSender.BringSiteOnlineResponsebringSiteOnline(java.lang.String siteName)Brings a site with the given name back online.OfflineStatusgetOfflineStatus(java.lang.String siteName)voidprocessResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command)Processes the responses of a backup command.voidprocessResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command, javax.transaction.Transaction transaction)java.util.Map<java.lang.String,java.lang.Boolean>status()Returns a Map having as entries the site names and as value Boolean.TRUE if the site is online and Boolean.FALSE if it is offline.BackupSender.TakeSiteOfflineResponsetakeSiteOffline(java.lang.String siteName)
-
-
-
Method Detail
-
backupPrepare
BackupResponse backupPrepare(org.infinispan.commands.tx.PrepareCommand command, org.infinispan.transaction.impl.AbstractCacheTransaction cacheTransaction) throws java.lang.Exception
Prepares a transaction on the remote site.- Throws:
java.lang.Exception
-
processResponses
void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command) throws java.lang.Throwable
Processes the responses of a backup command. It might throw an exception in the case the replication to the remote site fail, based on the configuredCustomFailurePolicy.- Throws:
java.lang.Throwable
-
backupWrite
BackupResponse backupWrite(org.infinispan.commands.write.WriteCommand command) throws java.lang.Exception
- Throws:
java.lang.Exception
-
backupCommit
BackupResponse backupCommit(org.infinispan.commands.tx.CommitCommand command) throws java.lang.Exception
- Throws:
java.lang.Exception
-
backupRollback
BackupResponse backupRollback(org.infinispan.commands.tx.RollbackCommand command) throws java.lang.Exception
- Throws:
java.lang.Exception
-
processResponses
void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command, javax.transaction.Transaction transaction) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getOfflineStatus
OfflineStatus getOfflineStatus(java.lang.String siteName)
-
status
java.util.Map<java.lang.String,java.lang.Boolean> status()
Returns a Map having as entries the site names and as value Boolean.TRUE if the site is online and Boolean.FALSE if it is offline.
-
bringSiteOnline
BackupSender.BringSiteOnlineResponse bringSiteOnline(java.lang.String siteName)
Brings a site with the given name back online.
-
takeSiteOffline
BackupSender.TakeSiteOfflineResponse takeSiteOffline(java.lang.String siteName)
-
-