Package org.infinispan.xsite
Interface BackupSender
-
- All Known Implementing Classes:
BackupSenderImpl
public interface BackupSender
Component responsible with sending backup data to remote sites. The send operation is executed async, it's up to the caller to wait on the returnedBackupResponse
in 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 class
BackupSender.BringSiteOnlineResponse
static class
BackupSender.TakeSiteOfflineResponse
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BackupResponse
backupCommit(org.infinispan.commands.tx.CommitCommand command)
BackupResponse
backupPrepare(org.infinispan.commands.tx.PrepareCommand command, org.infinispan.transaction.impl.AbstractCacheTransaction cacheTransaction)
Prepares a transaction on the remote site.BackupResponse
backupRollback(org.infinispan.commands.tx.RollbackCommand command)
BackupResponse
backupWrite(org.infinispan.commands.write.WriteCommand command)
BackupSender.BringSiteOnlineResponse
bringSiteOnline(String siteName)
Brings a site with the given name back online.OfflineStatus
getOfflineStatus(String siteName)
void
processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command)
Processes the responses of a backup command.void
processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command, Transaction transaction)
Map<String,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.TakeSiteOfflineResponse
takeSiteOffline(String siteName)
-
-
-
Method Detail
-
backupPrepare
BackupResponse backupPrepare(org.infinispan.commands.tx.PrepareCommand command, org.infinispan.transaction.impl.AbstractCacheTransaction cacheTransaction) throws Exception
Prepares a transaction on the remote site.- Throws:
Exception
-
processResponses
void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command) throws 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:
Throwable
-
backupWrite
BackupResponse backupWrite(org.infinispan.commands.write.WriteCommand command) throws Exception
- Throws:
Exception
-
backupCommit
BackupResponse backupCommit(org.infinispan.commands.tx.CommitCommand command) throws Exception
- Throws:
Exception
-
backupRollback
BackupResponse backupRollback(org.infinispan.commands.tx.RollbackCommand command) throws Exception
- Throws:
Exception
-
processResponses
void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command, Transaction transaction) throws Throwable
- Throws:
Throwable
-
getOfflineStatus
OfflineStatus getOfflineStatus(String siteName)
-
status
Map<String,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(String siteName)
Brings a site with the given name back online.
-
takeSiteOffline
BackupSender.TakeSiteOfflineResponse takeSiteOffline(String siteName)
-
-