Esempio n. 1
0
 /**
  * addChild<p>
  * The method will create new arc which unique name is @param arcName<p>
  * the method is not accessible to the storage user;<p>
  * if the storage user wants to add arc to node he must do the change by the schema;<p>
  * @param child
  * @param arcName
  * @return
  */
 internal Arc addChild(Node child,byte[] arcName)
 {
     Arc arc=new Arc(this,child,arcName);
        this.children.put(arcName,arc);
        child.parents.Add(arc);
     return arc;
 }
Esempio n. 2
0
 public void RemoveArc(Arc arc)
 {
     validate(arc.getChild(),arc.getParent());
     RemoveArcFromNode(arc.getParent(),arc.getName());
 }
Esempio n. 3
0
 public Arc put(byte[] name, Arc arc)
 {
     return map[new ByteArrayWrapper(name)] = arc;
 }
Esempio n. 4
0
 /**
  * removeArcFromNode method
  * Remove arc from node
  * using this method ensure that the server has have accepted
  * the arc removal, and it also ensure that all the clients will
  * receive the change by the same sequence in which the server has.
  * But it is impossible predict the change acceptance time in the remote
  * clients because of networks limits.
  * @param arc
  * @throws AbstractPlanckDBException
  */
 public void RemoveArc(Arc arc)
 {
     if(arc!=null){
         Command command = commandBuilder.buildRemoveChildFromParentNode(arc.getParent().getId(),arc.getName(), arc.getChild().getId(),sessionMetaData.getSchemaId(), core.getCoreManager().getKey(),sessionMetaData.GetSessionId(),lockTimeout);
         commandExecutor.produce(command);
     }else{
         throw new PlanckDBException(CommandStatus.noChildParentReference,CommandStatus.noChildParentReference.getMessage());
     }
 }
Esempio n. 5
0
 public bool containsValue(Arc arc)
 {
     return map.ContainsValue(arc);
 }