|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sapia.archie.sync.SynchronizedNode
public class SynchronizedNode
| Constructor Summary | |
|---|---|
SynchronizedNode(Node node)
|
|
| Method Summary | |
|---|---|
Node |
createChild(NamePart name)
Creates the node corresponding to the given name and returns it. |
Name |
getAbsolutePath()
Returns the full path to this node, starting from the root. |
Node |
getChild(NamePart name)
Returns the node with the given name. |
java.util.Iterator |
getChildren()
Returns this instance's child nodes. |
int |
getChildrenCount()
Returns the number of children that this instance contains. |
java.util.Iterator |
getChildrenNames()
Returns the names of this instance's nodes. |
java.util.Iterator |
getEntries()
|
NamePart |
getName()
Return this instance's name. |
NameParser |
getNameParser()
Returns this implementation's name parser. |
Node |
getParent()
Returns this instance's parent. |
Synchronizer |
getSynchronizer()
|
java.lang.Object |
getValue(NamePart name)
Returns this node's value. |
int |
getValueCount()
Returns the number of values that this instance contains. |
java.util.Iterator |
getValueNames()
Returns the names of this instance's values. |
boolean |
putValue(NamePart name,
java.lang.Object value,
boolean overwrite)
Put a value into this node; overwrites the existing value - if any. |
Node |
removeChild(NamePart name)
Removes the node with the given name. |
java.lang.Object |
removeValue(NamePart name)
Internally removes the value that this node holds and returns it. |
void |
setSynchronizer(Synchronizer sync)
|
void |
setUp(Node parent,
NamePart nodeName)
Sets this node's name and parent node. |
java.lang.Object |
synchronizeGet(NamePart valueName)
This method should be called when needing to synchronize a lookup that occurred at another node. |
void |
synchronizePut(NamePart valueName,
java.lang.Object toSync,
boolean overwrite)
This method should be called when needing to synchronize the content of this node with a "putValue" that occurred at another node. |
void |
synchronizeRemove(NamePart valueName)
This method should be called when needing to synchronize the content of this node with a "removeValue" that occurred at another node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SynchronizedNode(Node node)
node - the Node that this instance encapsulates.| Method Detail |
|---|
public void setSynchronizer(Synchronizer sync)
sync - a Synchronizer instance.public Synchronizer getSynchronizer()
Synchronizer that this instance uses.
public void synchronizePut(NamePart valueName,
java.lang.Object toSync,
boolean overwrite)
valueName - the NamePart corresponding to the
name of the value to synchronize.toSync - the value to put into this node, under the given name.public void synchronizeRemove(NamePart valueName)
valueName - the NamePart corresponding to the
name of the value to remove.public java.lang.Object synchronizeGet(NamePart valueName)
valueName - the NamePart corresponding to the
name of the value to look up.
Object corresponding to the given name, or
null if no object exists for that name.
public Node createChild(NamePart name)
throws DuplicateException,
ProcessingException
Node
createChild in interface Nodename - a NamePart
Node.
DuplicateException - if a node exists for the given name.
ProcessingExceptionNode.createChild(org.sapia.archie.NamePart)public Name getAbsolutePath()
Node
getAbsolutePath in interface NodeName.Node.getAbsolutePath()public Node getChild(NamePart name)
Node
getChild in interface Nodename - a NamePart corresponding to the name of an
existing child node.
Node or null if not child exists
for the given name.Node.getChild(org.sapia.archie.NamePart)public java.util.Iterator getChildren()
Node
getChildren in interface NodeIterator of Nodes.Node.getChildren()public int getChildrenCount()
Node
getChildrenCount in interface NodeNode.getChildrenCount()public java.util.Iterator getChildrenNames()
Node
getChildrenNames in interface NodeIterator of NameParts.Node.getChildrenNames()public java.util.Iterator getEntries()
getEntries in interface NodeIterator of Entry instances,
corresponding to the bindings that this instance holds.Node.getEntries()public NamePart getName()
Node
getName in interface NodeNamePart.Node.getName()public NameParser getNameParser()
Node
getNameParser in interface NodeNameParser.Node.getNameParser()public Node getParent()
Node
getParent in interface NodeNode.Node.getParent()public java.lang.Object getValue(NamePart name)
Node
getValue in interface NodeObject, or null if this node has
no value.Node.getValue(org.sapia.archie.NamePart)public int getValueCount()
Node
getValueCount in interface NodeNode.getValueCount()public java.util.Iterator getValueNames()
Node
getValueNames in interface NodeIterator of NameParts.Node.getValueNames()
public boolean putValue(NamePart name,
java.lang.Object value,
boolean overwrite)
Node
putValue in interface Nodename - the name under which to bind the given value.value - an Object.overwrite - if true, overwrites the already existing value
for the given name - it such is the case.
true if the given value was added. Returns false
if overwrite is false and a value already exists for the
given name.Node.putValue(org.sapia.archie.NamePart, java.lang.Object, boolean)public Node removeChild(NamePart name)
Node
removeChild in interface Nodename - a NamePart corresponding to the name of an
existing child node.
Node or null if not child exists
for the given name.Node.removeChild(org.sapia.archie.NamePart)public java.lang.Object removeValue(NamePart name)
Node
removeValue in interface NodeObject, or null if this node has
no value.Node.removeValue(org.sapia.archie.NamePart)
public void setUp(Node parent,
NamePart nodeName)
Node
setUp in interface Nodeparent - this instance's parent NodenodeName - a NamePart.Node.setUp(org.sapia.archie.Node, org.sapia.archie.NamePart)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||