Package org.infinispan.xsite
Class BackupSenderImpl
- java.lang.Object
-
- org.infinispan.xsite.BackupSenderImpl
-
- All Implemented Interfaces:
BackupSender
public class BackupSenderImpl extends Object implements BackupSender
- Since:
- 5.2
- Author:
- Mircea Markus
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.xsite.BackupSender
BackupSender.BringSiteOnlineResponse, BackupSender.TakeSiteOfflineResponse
-
-
Constructor Summary
Constructors Constructor Description BackupSenderImpl(String localSiteName)
-
Method Summary
All Methods Instance Methods Concrete 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(String siteName)Brings a site with the given name back online.OfflineStatusgetOfflineStatus(String site)voidprocessResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command)Processes the responses of a backup command.voidprocessResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command, Transaction transaction)voidstart()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)
-
-
-
Constructor Detail
-
BackupSenderImpl
public BackupSenderImpl(String localSiteName)
-
-
Method Detail
-
start
public void start()
-
backupPrepare
public BackupResponse backupPrepare(org.infinispan.commands.tx.PrepareCommand command, org.infinispan.transaction.impl.AbstractCacheTransaction cacheTransaction) throws Exception
Description copied from interface:BackupSenderPrepares a transaction on the remote site.- Specified by:
backupPreparein interfaceBackupSender- Throws:
Exception
-
processResponses
public void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command) throws Throwable
Description copied from interface:BackupSenderProcesses 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.- Specified by:
processResponsesin interfaceBackupSender- Throws:
Throwable
-
processResponses
public void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command, Transaction transaction) throws Throwable
- Specified by:
processResponsesin interfaceBackupSender- Throws:
Throwable
-
backupWrite
public BackupResponse backupWrite(org.infinispan.commands.write.WriteCommand command) throws Exception
- Specified by:
backupWritein interfaceBackupSender- Throws:
Exception
-
backupCommit
public BackupResponse backupCommit(org.infinispan.commands.tx.CommitCommand command) throws Exception
- Specified by:
backupCommitin interfaceBackupSender- Throws:
Exception
-
backupRollback
public BackupResponse backupRollback(org.infinispan.commands.tx.RollbackCommand command) throws Exception
- Specified by:
backupRollbackin interfaceBackupSender- Throws:
Exception
-
bringSiteOnline
public BackupSender.BringSiteOnlineResponse bringSiteOnline(String siteName)
Description copied from interface:BackupSenderBrings a site with the given name back online.- Specified by:
bringSiteOnlinein interfaceBackupSender
-
takeSiteOffline
public BackupSender.TakeSiteOfflineResponse takeSiteOffline(String siteName)
- Specified by:
takeSiteOfflinein interfaceBackupSender
-
getOfflineStatus
public OfflineStatus getOfflineStatus(String site)
- Specified by:
getOfflineStatusin interfaceBackupSender
-
status
public Map<String,Boolean> status()
Description copied from interface:BackupSenderReturns 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.- Specified by:
statusin interfaceBackupSender
-
-