Package org.apache.zookeeper.Watcher.Event

Examples of org.apache.zookeeper.Watcher.Event.EventType


    state_id = cluster_state.register(new ClusterStateCallback() {

      @Override
      public <T> Object execute(T... args) {
        if (args != null && args.length == 2) {
          EventType zkEventTypes = (EventType) args[0];
          String path = (String) args[1];
          List<String> toks = PathUtils.tokenize_path(path);
          int size = toks.size();
          if (size >= 1) {
            String params = null;
View Full Code Here


   * is called it means either our master has died, or a new one has come up.
   * Either way we need to update our knowledge of the master.
   * @param event WatchedEvent from ZooKeeper.
   */
  public void process(WatchedEvent event) {
    EventType type = event.getType();
    KeeperState state = event.getState();
    LOG.info("Got ZooKeeper event, state: " + state + ", type: " +
      type + ", path: " + event.getPath());

    // Ignore events if we're shutting down.
View Full Code Here

    public void process(WatchedEvent event) {
      if (log.isTraceEnabled())
        log.trace(event);
     
      final String zPath = event.getPath();
      final EventType zType = event.getType();
     
      String tablesPrefix = ZooUtil.getRoot(instance) + Constants.ZTABLES;
      String tableId = null;
     
      if (zPath != null && zPath.startsWith(tablesPrefix + "/")) {
View Full Code Here

   * is called it means either our master has died, or a new one has come up.
   * Either way we need to update our knowledge of the master.
   * @param event WatchedEvent from ZooKeeper.
   */
  public void process(WatchedEvent event) {
    EventType type = event.getType();
    KeeperState state = event.getState();
    LOG.info("Got ZooKeeper event, state: " + state + ", type: " +
      type + ", path: " + event.getPath());

    // Ignore events if we're shutting down.
View Full Code Here

   * is called it means either our master has died, or a new one has come up.
   * Either way we need to update our knowledge of the master.
   * @param event WatchedEvent from ZooKeeper.
   */
  public void process(WatchedEvent event) {
    EventType type = event.getType();
    KeeperState state = event.getState();
    LOG.info("Got ZooKeeper event, state: " + state + ", type: " +
      type + ", path: " + event.getPath());

    // Ignore events if we're shutting down.
View Full Code Here

    }

    @Test
    public void testInvalidIntConversion() {
        try {
            EventType et = EventType.fromInt(324242);
            fail("Was able to create an invalid EventType via an integer");
        } catch(RuntimeException re) {
            // we're good.
        }
View Full Code Here

   * is called it means either our master has died, or a new one has come up.
   * Either way we need to update our knowledge of the master.
   * @param event WatchedEvent from ZooKeeper.
   */
  public void process(WatchedEvent event) {
    EventType type = event.getType();
    KeeperState state = event.getState();
    LOG.info("Got ZooKeeper event, state: " + state + ", type: " +
      type + ", path: " + event.getPath());

    // Ignore events if we're shutting down.
View Full Code Here

    public void process(WatchedEvent event) {
      if (log.isTraceEnabled())
        log.trace(event);
     
      final String zPath = event.getPath();
      final EventType zType = event.getType();
     
      String tablesPrefix = ZooUtil.getRoot(instance) + Constants.ZTABLES;
      String tableId = null;
     
      if (zPath != null && zPath.startsWith(tablesPrefix + "/")) {
View Full Code Here

   * is called it means either our master has died, or a new one has come up.
   * Either way we need to update our knowledge of the master.
   * @param event WatchedEvent from ZooKeeper.
   */
  public void process(WatchedEvent event) {
    EventType type = event.getType();
    KeeperState state = event.getState();
    LOG.info("Got ZooKeeper event, state: " + state + ", type: " +
      type + ", path: " + event.getPath());

    // Ignore events if we're shutting down.
View Full Code Here

    public void process(WatchedEvent event) {
      if (log.isTraceEnabled())
        log.trace(event);
     
      final String zPath = event.getPath();
      final EventType zType = event.getType();
     
      String tablesPrefix = ZooUtil.getRoot(instance) + Constants.ZTABLES;
      String tableId = null;
     
      if (zPath != null && zPath.startsWith(tablesPrefix + "/")) {
View Full Code Here

TOP

Related Classes of org.apache.zookeeper.Watcher.Event.EventType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.