org.codehaus.wadi.replication.manager.basic
Class SyncReplicationManager

java.lang.Object
  extended by org.codehaus.wadi.replication.manager.basic.SyncReplicationManager
All Implemented Interfaces:
Lifecycle, ReplicationManager

public class SyncReplicationManager
extends java.lang.Object
implements ReplicationManager

Version:
$Revision: 2540 $

Field Summary
 
Fields inherited from interface org.codehaus.wadi.replication.manager.ReplicationManager
NAME
 
Constructor Summary
SyncReplicationManager(ServiceSpace serviceSpace, ObjectStateHandler stateHandler, BackingStrategy backingStrategy, ReplicaStorage localReplicaStorage)
           
SyncReplicationManager(ServiceSpace serviceSpace, ObjectStateHandler stateHandler, BackingStrategy backingStrategy, ReplicaStorage localReplicaStorage, ProxyFactory proxyFactory)
           
 
Method Summary
 void create(java.lang.Object key, Motable tmp)
           
 void destroy(java.lang.Object key)
           
 java.util.Set<java.lang.Object> getManagedReplicaInfoKeys()
           
 void insertReplicaInfo(java.lang.Object key, ReplicaInfo replicaInfo)
           
protected  java.util.Map<java.lang.Object,ReplicaInfo> newKeyToReplicaInfo()
           
protected  SecondaryManager newSecondaryManager()
           
 void promoteToMaster(java.lang.Object key, ReplicaInfo replicaInfo, Motable motable, Peer blackListedSecondary)
           
protected  void promoteToMaster(java.lang.Object key, ReplicaInfo replicaInfo, Peer blackListedSecondary)
           
 ReplicaInfo releaseReplicaInfo(java.lang.Object key, Peer newPrimary)
           
 Motable retrieveReplica(java.lang.Object key)
           
protected  ReplicaInfo retrieveReplicaInfo(java.lang.Object key)
           
 void start()
           
protected  void startStorageMonitoring()
           
 void stop()
           
protected  void stopStorageMonitoring()
           
 void update(java.lang.Object key, Motable tmp)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncReplicationManager

public SyncReplicationManager(ServiceSpace serviceSpace,
                              ObjectStateHandler stateHandler,
                              BackingStrategy backingStrategy,
                              ReplicaStorage localReplicaStorage)

SyncReplicationManager

public SyncReplicationManager(ServiceSpace serviceSpace,
                              ObjectStateHandler stateHandler,
                              BackingStrategy backingStrategy,
                              ReplicaStorage localReplicaStorage,
                              ProxyFactory proxyFactory)
Method Detail

newSecondaryManager

protected SecondaryManager newSecondaryManager()

newKeyToReplicaInfo

protected java.util.Map<java.lang.Object,ReplicaInfo> newKeyToReplicaInfo()

start

public void start()
           throws java.lang.Exception
Specified by:
start in interface Lifecycle
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Specified by:
stop in interface Lifecycle
Throws:
java.lang.Exception

create

public void create(java.lang.Object key,
                   Motable tmp)
Specified by:
create in interface ReplicationManager

update

public void update(java.lang.Object key,
                   Motable tmp)
Specified by:
update in interface ReplicationManager

destroy

public void destroy(java.lang.Object key)
Specified by:
destroy in interface ReplicationManager

retrieveReplica

public Motable retrieveReplica(java.lang.Object key)
Specified by:
retrieveReplica in interface ReplicationManager

promoteToMaster

public void promoteToMaster(java.lang.Object key,
                            ReplicaInfo replicaInfo,
                            Motable motable,
                            Peer blackListedSecondary)
                     throws InternalReplicationManagerException
Specified by:
promoteToMaster in interface ReplicationManager
Throws:
InternalReplicationManagerException

releaseReplicaInfo

public ReplicaInfo releaseReplicaInfo(java.lang.Object key,
                                      Peer newPrimary)
Specified by:
releaseReplicaInfo in interface ReplicationManager

insertReplicaInfo

public void insertReplicaInfo(java.lang.Object key,
                              ReplicaInfo replicaInfo)
                       throws ReplicationKeyAlreadyExistsException
Specified by:
insertReplicaInfo in interface ReplicationManager
Throws:
ReplicationKeyAlreadyExistsException

getManagedReplicaInfoKeys

public java.util.Set<java.lang.Object> getManagedReplicaInfoKeys()
Specified by:
getManagedReplicaInfoKeys in interface ReplicationManager

promoteToMaster

protected void promoteToMaster(java.lang.Object key,
                               ReplicaInfo replicaInfo,
                               Peer blackListedSecondary)

retrieveReplicaInfo

protected ReplicaInfo retrieveReplicaInfo(java.lang.Object key)

startStorageMonitoring

protected void startStorageMonitoring()
                               throws java.lang.Exception
Throws:
java.lang.Exception

stopStorageMonitoring

protected void stopStorageMonitoring()
                              throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2011. All Rights Reserved.