Package org.infinispan.xsite
Class NoOpBackupSender
- java.lang.Object
-
- org.infinispan.xsite.NoOpBackupSender
-
- All Implemented Interfaces:
BackupSender
public class NoOpBackupSender extends java.lang.Object implements BackupSender
A no-op implementation ofBackupSender.This class is used when cross-site replication is disabled.
- Since:
- 10.0
- Author:
- Pedro Ruivo
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.infinispan.xsite.BackupSender
BackupSender.BringSiteOnlineResponse, BackupSender.TakeSiteOfflineResponse
-
-
Method Summary
All Methods Static 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(java.lang.String siteName)Brings a site with the given name back online.static NoOpBackupSendergetInstance()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)java.lang.StringtoString()
-
-
-
Method Detail
-
getInstance
public static NoOpBackupSender getInstance()
-
backupPrepare
public BackupResponse backupPrepare(org.infinispan.commands.tx.PrepareCommand command, org.infinispan.transaction.impl.AbstractCacheTransaction cacheTransaction)
Description copied from interface:BackupSenderPrepares a transaction on the remote site.- Specified by:
backupPreparein interfaceBackupSender
-
processResponses
public void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command)
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
-
backupWrite
public BackupResponse backupWrite(org.infinispan.commands.write.WriteCommand command)
- Specified by:
backupWritein interfaceBackupSender
-
backupCommit
public BackupResponse backupCommit(org.infinispan.commands.tx.CommitCommand command)
- Specified by:
backupCommitin interfaceBackupSender
-
backupRollback
public BackupResponse backupRollback(org.infinispan.commands.tx.RollbackCommand command)
- Specified by:
backupRollbackin interfaceBackupSender
-
processResponses
public void processResponses(BackupResponse backupResponse, org.infinispan.commands.VisitableCommand command, javax.transaction.Transaction transaction)
- Specified by:
processResponsesin interfaceBackupSender
-
getOfflineStatus
public OfflineStatus getOfflineStatus(java.lang.String siteName)
- Specified by:
getOfflineStatusin interfaceBackupSender
-
status
public java.util.Map<java.lang.String,java.lang.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
-
bringSiteOnline
public BackupSender.BringSiteOnlineResponse bringSiteOnline(java.lang.String siteName)
Description copied from interface:BackupSenderBrings a site with the given name back online.- Specified by:
bringSiteOnlinein interfaceBackupSender
-
takeSiteOffline
public BackupSender.TakeSiteOfflineResponse takeSiteOffline(java.lang.String siteName)
- Specified by:
takeSiteOfflinein interfaceBackupSender
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-