org.codehaus.wadi.replication.manager.basic
Class SyncReplicationManager
java.lang.Object
org.codehaus.wadi.replication.manager.basic.SyncReplicationManager
- All Implemented Interfaces:
- Lifecycle, ReplicationManager
public class SyncReplicationManager
- extends java.lang.Object
- implements ReplicationManager
- Version:
- $Revision: 2398 $
Method Summary |
protected void |
cascadeCreate(java.lang.Object key,
ReplicaInfo replicaInfo,
byte[] fullState,
SyncReplicationManager.BackOffCapableTask task)
|
protected void |
cascadeDestroy(java.lang.Object key,
ReplicaInfo replicaInfo)
|
protected void |
cascadeUpdate(java.lang.Object key,
ReplicaInfo replicaInfo,
byte[] updatedState)
|
void |
create(java.lang.Object key,
java.lang.Object 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()
|
ReplicaInfo |
releaseReplicaInfo(java.lang.Object key,
org.codehaus.wadi.group.Peer newPrimary)
|
protected void |
reOrganizeSecondaries()
|
protected ReplicaInfo |
reOrganizeSecondaries(java.lang.Object key,
ReplicaInfo replicaInfo)
|
java.lang.Object |
retrieveReplica(java.lang.Object key)
|
void |
start()
|
protected void |
startStorageMonitoring()
|
void |
stop()
|
protected void |
stopStorageMonitoring()
|
void |
update(java.lang.Object key,
java.lang.Object tmp)
|
protected void |
updateReplicaStorages(java.lang.Object key,
ReplicaInfo replicaInfo,
org.codehaus.wadi.group.Peer[] oldSecondaries)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SyncReplicationManager
public SyncReplicationManager(ServiceSpace serviceSpace,
ObjectStateHandler stateHandler,
BackingStrategy backingStrategy,
ReplicaStorage localReplicaStorage)
SyncReplicationManager
public SyncReplicationManager(ServiceSpace serviceSpace,
ObjectStateHandler stateHandler,
BackingStrategy backingStrategy,
ReplicaStorage localReplicaStorage,
ProxyFactory proxyFactory)
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,
java.lang.Object tmp)
- Specified by:
create
in interface ReplicationManager
update
public void update(java.lang.Object key,
java.lang.Object tmp)
- Specified by:
update
in interface ReplicationManager
destroy
public void destroy(java.lang.Object key)
- Specified by:
destroy
in interface ReplicationManager
retrieveReplica
public java.lang.Object retrieveReplica(java.lang.Object key)
- Specified by:
retrieveReplica
in interface ReplicationManager
releaseReplicaInfo
public ReplicaInfo releaseReplicaInfo(java.lang.Object key,
org.codehaus.wadi.group.Peer newPrimary)
throws ReplicationKeyNotFoundException
- Specified by:
releaseReplicaInfo
in interface ReplicationManager
- Throws:
ReplicationKeyNotFoundException
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
cascadeCreate
protected void cascadeCreate(java.lang.Object key,
ReplicaInfo replicaInfo,
byte[] fullState,
SyncReplicationManager.BackOffCapableTask task)
cascadeUpdate
protected void cascadeUpdate(java.lang.Object key,
ReplicaInfo replicaInfo,
byte[] updatedState)
cascadeDestroy
protected void cascadeDestroy(java.lang.Object key,
ReplicaInfo replicaInfo)
reOrganizeSecondaries
protected void reOrganizeSecondaries()
reOrganizeSecondaries
protected ReplicaInfo reOrganizeSecondaries(java.lang.Object key,
ReplicaInfo replicaInfo)
updateReplicaStorages
protected void updateReplicaStorages(java.lang.Object key,
ReplicaInfo replicaInfo,
org.codehaus.wadi.group.Peer[] oldSecondaries)
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 © 2010. All Rights Reserved.