Package org.apache.hdt.core.internal.model

Examples of org.apache.hdt.core.internal.model.ZNode


  }

  @Override
  public Object getParent(Object element) {
    if (element instanceof ZNode) {
      ZNode zkn = (ZNode) element;
      return zkn.getParent();
    }
    return null;
  }
View Full Code Here


            if (targetPart instanceof ProjectExplorer) {
              ProjectExplorer pe = (ProjectExplorer) targetPart;
              pe.getCommonViewer().refresh();
            }
          } else if (object instanceof ZNode) {
            ZNode zkn = (ZNode) object;
            if (logger.isDebugEnabled())
              logger.debug("Deleting: " + zkn);
            try {
              ZooKeeperClient client = ZooKeeperManager.INSTANCE.getClient(zkn.getServer());
              client.delete(zkn);
            } catch (Exception e) {
              logger.error("Error occurred ", e);
              showError(e.getMessage());
            }
View Full Code Here

        enabled = false;
        if (object instanceof ZooKeeperServer) {
          ZooKeeperServer server = (ZooKeeperServer) object;
          enabled = server != null;
        } else if (object instanceof ZNode) {
          ZNode zkn = (ZNode) object;
          enabled = zkn != null;
        }
      }
    } else
      enabled = false;
View Full Code Here

  }

  @Override
  public Object[] getChildren(Object parentElement) {
    if (parentElement instanceof ZNode) {
      ZNode zkn = (ZNode) parentElement;
      try {
        ZooKeeperClient client = ZooKeeperManager.INSTANCE.getClient(zkn.getServer());
        List<ZNode> zkChildren = client.getChildren(zkn);
        return zkChildren.toArray();
      } catch (Exception e) {
        logger.error("Error getting children of node", e);
        MessageDialog.openError(Display.getDefault().getActiveShell(),
View Full Code Here

  }

  @Override
  public Object getParent(Object element) {
    if (element instanceof ZNode) {
      ZNode zkn = (ZNode) element;
      return zkn.getParent();
    }
    return null;
  }
View Full Code Here

TOP

Related Classes of org.apache.hdt.core.internal.model.ZNode

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.