Package aleph.dir

Examples of aleph.dir.DirectoryManager.open()


    }
    final DistributedImmutableBST<E> newTree = tree.add(item);
    if (newTree == tree) {
      return false;
    }
    container = (IDContainer<DistributedImmutableBST<E>>) locator.open(containerID, "w");
    container.setItem(newTree);
    return true;
  }

  /*
 
View Full Code Here


  }

  @Atomic
  private DistributedImmutableBST<E> getRoot() {
    DirectoryManager locator = HyFlow.getLocator();
    IDContainer<DistributedImmutableBST<E>> container = (IDContainer<DistributedImmutableBST<E>>) locator.open(containerID, "r");
    return container.getItem();
  }

  /*
   * (non-Javadoc)
 
View Full Code Here

   */
  @Atomic
  @Override
  public boolean remove(E item) {
    DirectoryManager locator = HyFlow.getLocator();
    IDContainer<DistributedImmutableBST<E>> container = (IDContainer<DistributedImmutableBST<E>>) locator.open(containerID, "r");
    final DistributedImmutableBST<E> tree = container.getItem();
    if (tree == null) {
      return false;
    }
    final DistributedImmutableBST<E> newTree = tree.remove(item);
View Full Code Here

    }
    final DistributedImmutableBST<E> newTree = tree.remove(item);
    if (newTree == tree) {
      return false;
    }
    container = (IDContainer<DistributedImmutableBST<E>>) locator.open(containerID, "w");
    container.setItem(newTree);
    return true;
  }

}
View Full Code Here

   */
  @Atomic
  @Override
  public boolean add(E value) {
    DirectoryManager locator = HyFlow.getLocator();
    BST<E> tree = (BST<E>) locator.open(treeID, "w");
    return tree.add(value);
  }

  /*
   * (non-Javadoc)
 
View Full Code Here

   */
  @Atomic
  @Override
  public boolean contains(E value) {
    DirectoryManager locator = HyFlow.getLocator();
    BST<E> tree = (BST<E>) locator.open(treeID, "r");
    return tree.contains(value);
  }

  /*
   * (non-Javadoc)
 
View Full Code Here

   */
  @Atomic
  @Override
  public boolean remove(E value) {
    DirectoryManager locator = HyFlow.getLocator();
    BST<E> tree = (BST<E>) locator.open(treeID, "w");
    return tree.remove(value);
  }

}
View Full Code Here

   */
  @Atomic
  @Override
  public boolean add(E value) {
    DirectoryManager locator = HyFlow.getLocator();
    IDContainer<ImmutableHashMap<E, E>> container = (IDContainer<ImmutableHashMap<E, E>>) locator.open(containerID, "r");
    final ImmutableHashMap<E, E> map = container.getItem();
    Box found = new Box(null);
    final ImmutableHashMap<E, E> newMap = map.put(value, value, found);
    if (found.value != null) {
      return false;
View Full Code Here

    Box found = new Box(null);
    final ImmutableHashMap<E, E> newMap = map.put(value, value, found);
    if (found.value != null) {
      return false;
    }
    container = (IDContainer<ImmutableHashMap<E, E>>) locator.open(containerID, "w");
    container.setItem(newMap);
    return true;
  }

  /* (non-Javadoc)
 
View Full Code Here

  }
 
  @Atomic
  private ImmutableHashMap<E, E> getHead() {
    DirectoryManager locator = HyFlow.getLocator();
    IDContainer<ImmutableHashMap<E, E>> container = (IDContainer<ImmutableHashMap<E, E>>) locator.open(containerID, "r");
    return container.getItem();
  }

  /* (non-Javadoc)
   * @see edu.vt.rt.datastructures.lang.DistributedSet#remove(java.io.Serializable)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.