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 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 site)
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)
void
start()
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)
-
-
-
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:BackupSender
Prepares a transaction on the remote site.- Specified by:
backupPrepare
in interfaceBackupSender
- Throws:
Exception
-
processResponses
public void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command) throws Throwable
Description copied from interface:BackupSender
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
.- Specified by:
processResponses
in interfaceBackupSender
- Throws:
Throwable
-
processResponses
public void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command, Transaction transaction) throws Throwable
- Specified by:
processResponses
in interfaceBackupSender
- Throws:
Throwable
-
backupWrite
public BackupResponse backupWrite(org.infinispan.commands.write.WriteCommand command) throws Exception
- Specified by:
backupWrite
in interfaceBackupSender
- Throws:
Exception
-
backupCommit
public BackupResponse backupCommit(org.infinispan.commands.tx.CommitCommand command) throws Exception
- Specified by:
backupCommit
in interfaceBackupSender
- Throws:
Exception
-
backupRollback
public BackupResponse backupRollback(org.infinispan.commands.tx.RollbackCommand command) throws Exception
- Specified by:
backupRollback
in interfaceBackupSender
- Throws:
Exception
-
bringSiteOnline
public BackupSender.BringSiteOnlineResponse bringSiteOnline(String siteName)
Description copied from interface:BackupSender
Brings a site with the given name back online.- Specified by:
bringSiteOnline
in interfaceBackupSender
-
takeSiteOffline
public BackupSender.TakeSiteOfflineResponse takeSiteOffline(String siteName)
- Specified by:
takeSiteOffline
in interfaceBackupSender
-
getOfflineStatus
public OfflineStatus getOfflineStatus(String site)
- Specified by:
getOfflineStatus
in interfaceBackupSender
-
status
public Map<String,Boolean> status()
Description copied from interface:BackupSender
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.- Specified by:
status
in interfaceBackupSender
-
-