org.codehaus.wadi.dindex.impl
Class SimplePartitionManager
java.lang.Object
org.codehaus.wadi.dindex.impl.SimplePartitionManager
- All Implemented Interfaces:
- PartitionConfig, PartitionManager
- public class SimplePartitionManager
- extends Object
- implements PartitionManager, PartitionConfig
A Simple PartitionManager.
- Author:
- jules
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_partitionKeysKey
protected static final String _partitionKeysKey
- See Also:
- Constant Field Values
_timeStampKey
protected static final String _timeStampKey
- See Also:
- Constant Field Values
_correlationIDMapKey
protected static final String _correlationIDMapKey
- See Also:
- Constant Field Values
_nodeName
protected final String _nodeName
_log
protected final Log _log
_numPartitions
protected final int _numPartitions
_partitions
protected final PartitionFacade[] _partitions
_cluster
protected final Cluster _cluster
_dispatcher
protected final Dispatcher _dispatcher
_distributedState
protected final Map _distributedState
_inactiveTime
protected final long _inactiveTime
_allowRegenerationOfMissingPartitions
protected final boolean _allowRegenerationOfMissingPartitions
- See Also:
- Constant Field Values
_callback
protected final SimplePartitionManager.Callback _callback
_mapper
protected final PartitionMapper _mapper
_pmSyncs
protected final LockManager _pmSyncs
_config
protected PartitionManagerConfig _config
SimplePartitionManager
public SimplePartitionManager(Dispatcher dispatcher,
int numPartitions,
Map distributedState,
SimplePartitionManager.Callback callback,
PartitionMapper mapper)
init
public void init(PartitionManagerConfig config)
- Specified by:
init
in interface PartitionManager
start
public void start()
throws Exception
- Specified by:
start
in interface PartitionManager
- Throws:
Exception
evacuate
public void evacuate()
throws Exception
- Specified by:
evacuate
in interface PartitionManager
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop
in interface PartitionManager
- Throws:
Exception
getPartition
public PartitionFacade getPartition(int partition)
- Specified by:
getPartition
in interface PartitionManager
onPartitionEvacuationRequest
public void onPartitionEvacuationRequest(ObjectMessage om,
PartitionEvacuationRequest request)
onPartitionRepopulateRequest
public void onPartitionRepopulateRequest(ObjectMessage om,
PartitionRepopulateRequest request)
onPartitionTransferCommand
public void onPartitionTransferCommand(ObjectMessage om,
PartitionTransferCommand command)
onPartitionTransferRequest
public void onPartitionTransferRequest(ObjectMessage om,
PartitionTransferRequest request)
createResultSet
public Collection[] createResultSet(int numPartitions,
int[] keys)
update
public void update(Node node)
- Specified by:
update
in interface PartitionManager
markExistingPartitions
public void markExistingPartitions(Node[] nodes,
boolean[] partitionIsPresent)
regenerateMissingPartitions
public void regenerateMissingPartitions(Node[] living,
Node[] leaving)
- Specified by:
regenerateMissingPartitions
in interface PartitionManager
getPartitionKeys
public PartitionKeys getPartitionKeys()
- Specified by:
getPartitionKeys
in interface PartitionManager
repopulate
public void repopulate(Destination location,
Collection[] keys)
localise
public void localise()
- Specified by:
localise
in interface PartitionManager
correlateStateUpdate
protected void correlateStateUpdate(Map state)
getNumPartitions
public int getNumPartitions()
- Specified by:
getNumPartitions
in interface PartitionManager
getPartition
public PartitionFacade getPartition(Object key)
- Specified by:
getPartition
in interface PartitionManager
getDispatcher
public Dispatcher getDispatcher()
- Specified by:
getDispatcher
in interface PartitionConfig
getCluster
public Cluster getCluster()
- Specified by:
getCluster
in interface PartitionConfig
getNodeName
public String getNodeName(Destination destination)
- Specified by:
getNodeName
in interface PartitionConfig
getInactiveTime
public long getInactiveTime()
- Specified by:
getInactiveTime
in interface PartitionConfig
getLocalNodeName
public String getLocalNodeName()
- Specified by:
getLocalNodeName
in interface PartitionConfig
getPMSyncs
public LockManager getPMSyncs()
- Specified by:
getPMSyncs
in interface PartitionConfig
Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.