org.apache.blur.manager.indexserver
Class SafeMode

java.lang.Object
  extended by org.apache.blur.zookeeper.ZooKeeperLockManager
      extended by org.apache.blur.manager.indexserver.SafeMode

public class SafeMode
extends ZooKeeperLockManager

This class controls the startup of the cluster. Basically the first node online waits until there is no more nodes that have started. The period that is required to have no activity is the waittime passed in through the constructor. If a new node comes online while the leader is waiting, the wait starts over. Once the wait period has been exhausted the cluster is to be settled and can now come online.


Field Summary
static String SETUP
           
static String STARTUP
           
 
Constructor Summary
SafeMode(org.apache.zookeeper.ZooKeeper zooKeeper, String lockPath, String nodePath, java.util.concurrent.TimeUnit waitTimeUnit, long waitTime, java.util.concurrent.TimeUnit duplicateNodeTimeoutTimeUnit, long duplicateNodeTimeout, int minimumNumberOfNodes)
           
 
Method Summary
 void registerNode(String node, byte[] data)
           
 
Methods inherited from class org.apache.blur.zookeeper.ZooKeeperLockManager
getNumberOfLockNodesPresent, lock, unlock
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

STARTUP

public static final String STARTUP
See Also:
Constant Field Values

SETUP

public static final String SETUP
See Also:
Constant Field Values
Constructor Detail

SafeMode

public SafeMode(org.apache.zookeeper.ZooKeeper zooKeeper,
                String lockPath,
                String nodePath,
                java.util.concurrent.TimeUnit waitTimeUnit,
                long waitTime,
                java.util.concurrent.TimeUnit duplicateNodeTimeoutTimeUnit,
                long duplicateNodeTimeout,
                int minimumNumberOfNodes)
Method Detail

registerNode

public void registerNode(String node,
                         byte[] data)
                  throws org.apache.zookeeper.KeeperException,
                         InterruptedException
Throws:
org.apache.zookeeper.KeeperException
InterruptedException


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.