Package org.infinispan.xsite
Interface BackupSender
-
- All Known Implementing Classes:
BackupSenderImpl
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, 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(String siteName)Brings a site with the given name back online.OfflineStatusgetOfflineStatus(String siteName)voidprocessResponses(BackupResponse backupResponse, VisitableCommand command)Processes the responses of a backup command.voidprocessResponses(BackupResponse backupResponse, 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.TakeSiteOfflineResponsetakeSiteOffline(String siteName)
-
-
-
Method Detail
-
backupPrepare
BackupResponse backupPrepare(org.infinispan.commands.tx.PrepareCommand command, AbstractCacheTransaction cacheTransaction) throws Exception
Prepares a transaction on the remote site.- Throws:
Exception
-
processResponses
void processResponses(BackupResponse backupResponse, 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, 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)
-
-