Package com.customized.tools.cli

Examples of com.customized.tools.cli.TreeNode


   
    for(String key : delegate.getGenericCache().keySet()) {
      String lifespan = delegate.getGenericCache().getAdvancedCache().getDataContainer().get(key).getLifespan() + "";
      String maxIdle = delegate.getGenericCache().getAdvancedCache().getDataContainer().get(key).getMaxIdle() + "";
      CacheEntry entity = new CacheEntry(key, delegate.getGenericCache().get(key), lifespan, maxIdle,alias);
      TreeNode node = new TreeNode(key, entity.toString(), getCurrentNode(), null);
      addTreeNode(node);
    }
  }
View Full Code Here


   
    // add to DataGrid
    delegate.getGenericCache().put(key, value, lifespan, TimeUnit.MILLISECONDS, maxIdle, TimeUnit.MILLISECONDS);
   
    // add to tree console
    TreeNode node = new TreeNode(key, entity.toString(), getCurrentNode(), null);
    addTreeNode(node);

  }
View Full Code Here

 
  protected void updateTreeNodes(String prompt) {
   
    cacheLogger.debugCache("Print Cache Content before execute [" + prompt + "]");
   
    TreeNode rootNode = getRootNode();
    rootNode.getSons().clear();
   
    Node<String, String> root = cache.getRoot();
    rootNode.setContent(root.getData() + "");
    synchTreeNodes(root, rootNode);

    updateCurrentNode(getTreeNode(getAbsolutePath()));
  }
View Full Code Here

  }

  private void synchTreeNodes(Node<String, String> root, TreeNode rootNode) {
   
    for(Node<String, String> node : root.getChildren()) {
      TreeNode treeNode = new TreeNode(node.getFqn().getLastElementAsString(), node.getData() + "", rootNode, null);
      rootNode.getSons().add(treeNode);
      synchTreeNodes(node, treeNode);
    }
  }
View Full Code Here

    Node parentNode = cache.getNode(Fqn.fromString(getAbsolutePath()));
   
    String fqn = readString("Enter JBossCache Fully Qualified Name:", true);
    Node node = parentNode.addChild(Fqn.fromString(fqn));
    prompt("Add JBossCache Node, Fully Qualified Name [" + node.getFqn() + "]");
    addTreeNode( new TreeNode(fqn, "", getCurrentNode(), null));
  }
View Full Code Here

   */
  private void updateTreeNode(String path, Map<String, String> data) {
   
    log.debug("updateTreeNode path = " + path + ", data = " + data);
   
    TreeNode node = getTreeNode(path);
    node.setContent(data + "");
  }
View Full Code Here

   */
  private void createTreeNode(String path, String name) {

    log.debug("createTreeNode path = " + path );
   
    TreeNode node = getTreeNode(path);
    removeTreeNode(node.getSons(), name);
    node.getSons().add(new TreeNode(name, "", node, null));
  }
View Full Code Here

   */
  private void removeTreeNode(String path, String name) {
   
    log.debug("createTreeNode path = " + path );
   
    TreeNode node = getTreeNode(path);
    removeTreeNode(node.getSons(), name);
  }
View Full Code Here

TOP

Related Classes of com.customized.tools.cli.TreeNode

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.