ti.chimera.registry
Class PersistentNode
java.lang.Object
ti.chimera.registry.Node
ti.chimera.registry.PersistentNode
- public class PersistentNode
- extends Node
A node that persistently stores its value. When a persistent node is
first linked in to the tree, it checks for a previously stored value, as
identified by the primary path (ie. the first path the node is linked
to) and if a previously stored value is found, it overrides the initial
value specified in the constructor. The value of a persistent node must
be Serializable
.
Note that currently values of a persistent node are stored when they are
set, rather than at system exit, so the stored value won't reflect side-
effects... for example if the value is a list, and an element is added
to the list after the value of the node gets set, the stored value won't
reflect the element added to the list. This is deemed to be the correct
behavior because it is consistent with the registry in that values of
registry nodes are only published to subscribers when they are changed
(via setValue(java.lang.Object)
).
Description of properties that are interesting:
property |
description |
regular default |
webstart default |
chimera.config.path |
where the persistent registry nodes are stored
| $CWD/config.jar |
$HOME/.config.jar |
- Version:
- 0.1
- Author:
- ;Rob Clark;a0873619;San Diego;;
Method Summary |
void |
setValue(java.lang.Object value)
Set the value of this node, and publish the new value to all the
subscribers. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PersistentNode
public PersistentNode(java.lang.Object value,
NodeContract contract,
java.lang.String comment)
- Class Constructor.
- Parameters:
value
- the node's initial valuecontract
- the node's contract, or null
comment
- a string containing a description of the purpose
of this node, the node's usage, etc. Can contain HTML markup.
setValue
public void setValue(java.lang.Object value)
- Set the value of this node, and publish the new value to all the
subscribers.
- Overrides:
setValue
in class Node
- Parameters:
value
- the node's new value