org.codehaus.wadi.dindex.impl
Class Coordinator

java.lang.Object
  extended byorg.codehaus.wadi.dindex.impl.Coordinator
All Implemented Interfaces:
Runnable

public class Coordinator
extends Object
implements Runnable


Field Summary
protected  Cluster _cluster
           
protected  CoordinatorConfig _config
           
protected  Dispatcher _dispatcher
           
protected  Slot _flag
           
protected  long _inactiveTime
           
protected  Node _localNode
           
protected  Log _log
           
protected  int _numItems
           
protected  Node[] _remoteNodes
           
protected  Thread _thread
           
 
Constructor Summary
Coordinator(CoordinatorConfig config)
           
 
Method Summary
protected  void execute(RedistributionPlan plan, String correlationId, Quipu quipu)
           
protected  Node getNode(Destination destination)
           
protected  int printNode(Node node)
           
protected  int printNodes(Collection nodes)
           
protected  void printNodes(Node[] living, Node[] leaving)
           
 void queueRebalancing()
           
 void rebalanceClusterState()
           
 void run()
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

protected final Log _log

_flag

protected final Slot _flag

_config

protected final CoordinatorConfig _config

_cluster

protected final Cluster _cluster

_dispatcher

protected final Dispatcher _dispatcher

_localNode

protected final Node _localNode

_numItems

protected final int _numItems

_inactiveTime

protected final long _inactiveTime

_thread

protected Thread _thread

_remoteNodes

protected Node[] _remoteNodes
Constructor Detail

Coordinator

public Coordinator(CoordinatorConfig config)
Method Detail

start

public void start()
           throws Exception
Throws:
Exception

stop

public void stop()
          throws Exception
Throws:
Exception

queueRebalancing

public void queueRebalancing()

run

public void run()
Specified by:
run in interface Runnable

rebalanceClusterState

public void rebalanceClusterState()

execute

protected void execute(RedistributionPlan plan,
                       String correlationId,
                       Quipu quipu)

printNodes

protected int printNodes(Collection nodes)

printNodes

protected void printNodes(Node[] living,
                          Node[] leaving)

printNode

protected int printNode(Node node)

getNode

protected Node getNode(Destination destination)


Copyright © 2004-2008 Core Developers Network Ltd.. All Rights Reserved.