Infinispan Distribution 5.2.6.Final-redhat-2

org.infinispan.xsite
Class BackupSenderImpl

java.lang.Object
  extended by org.infinispan.xsite.BackupSenderImpl
All Implemented Interfaces:
BackupSender

public class BackupSenderImpl
extends Object
implements BackupSender

Since:
5.2
Author:
Mircea Markus

Nested Class Summary
static class BackupSenderImpl.CustomBackupPolicyInvoker
           
 
Nested classes/interfaces inherited from interface org.infinispan.xsite.BackupSender
BackupSender.BringSiteOnlineResponse, BackupSender.TakeSiteOfflineResponse
 
Constructor Summary
BackupSenderImpl(String localSiteName)
           
 
Method Summary
 BackupResponse backupCommit(CommitCommand command)
           
 BackupResponse backupPrepare(PrepareCommand command)
          Prepares a transaction on the remote site.
 BackupResponse backupRollback(RollbackCommand command)
           
 BackupResponse backupWrite(WriteCommand command)
           
 BackupSender.BringSiteOnlineResponse bringSiteOnline(String siteName)
          Brings a site with the given name back online.
 OfflineStatus getOfflineStatus(String site)
           
 void init(Cache cache, Transport transport, TransactionTable txTable, GlobalConfiguration gc)
           
 void processResponses(BackupResponse backupResponse, VisitableCommand command)
          Processes the responses of a backup command.
 void processResponses(BackupResponse backupResponse, 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackupSenderImpl

public BackupSenderImpl(String localSiteName)
Method Detail

init

public void init(Cache cache,
                 Transport transport,
                 TransactionTable txTable,
                 GlobalConfiguration gc)

start

public void start()

backupPrepare

public BackupResponse backupPrepare(PrepareCommand command)
                             throws Exception
Description copied from interface: BackupSender
Prepares a transaction on the remote site.

Specified by:
backupPrepare in interface BackupSender
Throws:
Exception

processResponses

public void processResponses(BackupResponse backupResponse,
                             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 configured CustomFailurePolicy.

Specified by:
processResponses in interface BackupSender
Throws:
Throwable

processResponses

public void processResponses(BackupResponse backupResponse,
                             VisitableCommand command,
                             Transaction transaction)
                      throws Throwable
Specified by:
processResponses in interface BackupSender
Throws:
Throwable

backupWrite

public BackupResponse backupWrite(WriteCommand command)
                           throws Exception
Specified by:
backupWrite in interface BackupSender
Throws:
Exception

backupCommit

public BackupResponse backupCommit(CommitCommand command)
                            throws Exception
Specified by:
backupCommit in interface BackupSender
Throws:
Exception

backupRollback

public BackupResponse backupRollback(RollbackCommand command)
                              throws Exception
Specified by:
backupRollback in interface BackupSender
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 interface BackupSender

takeSiteOffline

public BackupSender.TakeSiteOfflineResponse takeSiteOffline(String siteName)
Specified by:
takeSiteOffline in interface BackupSender

getOfflineStatus

public OfflineStatus getOfflineStatus(String site)
Specified by:
getOfflineStatus in interface BackupSender

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 interface BackupSender

Infinispan Distribution 5.2.6.Final-redhat-2

Copyright © 2013 JBoss, a division of Red Hat. All Rights Reserved.