Lines Matching refs:node

101  * information at a preferences node.  The implementor should beware of the
102 * fact that another VM may have concurrently deleted this node from the
104 * node if it has been deleted.
135 * Our parent node.
140 * Our root node.
142 private final AbstractPreferences root; // Relative to this node
145 * This field should be <tt>true</tt> if this node did not exist in the
149 * indicates whether a node change event should be fired when
155 * All known unremoved children of this node. (This "cache" is consulted
161 * This field is used to keep track of whether or not this node has
173 * Registered node change listeners.
178 * An object whose monitor is used to lock this node. This object
179 * is used in preference to the node itself to reduce the likelihood of
180 * intentional or unintentional denial of service due to a locked node.
181 * To avoid deadlock, a node is <i>never</i> locked by a thread that
182 * holds a lock on a descendant of that node.
187 * Creates a preference node with the specified parent and the specified
190 * @param parent the parent of this preference node, or null if this
192 * @param name the name of this preference node, relative to its parent,
225 * obtains this preference node's lock, checks that the node
236 * @throws IllegalStateException if this node (or an ancestor) has been
262 * the case. Then it obtains this preference node's lock,
263 * checks that the node has not been removed, invokes {@link
270 * preference node has no value associated with <tt>key</tt>.
273 * @throws IllegalStateException if this node (or an ancestor) has been
299 * <p>This implementation obtains this preference node's lock,
300 * checks that the node has not been removed, invokes
305 * @param key key whose mapping is to be removed from the preference node.
306 * @throws IllegalStateException if this node (or an ancestor) has been
323 * <p>This implementation obtains this preference node's lock,
330 * @throws IllegalStateException if this node (or an ancestor) has been
354 * @throws IllegalStateException if this node (or an ancestor) has been
373 * preference node has no value associated with <tt>key</tt>
376 * <tt>key</tt> in this preference node, or <tt>def</tt> if the
379 * @throws IllegalStateException if this node (or an ancestor) has been
409 * @throws IllegalStateException if this node (or an ancestor) has been
428 * preference node has no value associated with <tt>key</tt>
431 * <tt>key</tt> in this preference node, or <tt>def</tt> if the
434 * @throws IllegalStateException if this node (or an ancestor) has been
464 * @throws IllegalStateException if this node (or an ancestor) has been
486 * preference node has no value associated with <tt>key</tt>
489 * <tt>key</tt> in this preference node, or <tt>def</tt> if the
492 * @throws IllegalStateException if this node (or an ancestor) has been
522 * @throws IllegalStateException if this node (or an ancestor) has been
541 * preference node has no value associated with <tt>key</tt>
544 * <tt>key</tt> in this preference node, or <tt>def</tt> if the
547 * @throws IllegalStateException if this node (or an ancestor) has been
577 * @throws IllegalStateException if this node (or an ancestor) has been
596 * preference node has no value associated with <tt>key</tt>
599 * <tt>key</tt> in this preference node, or <tt>def</tt> if the
602 * @throws IllegalStateException if this node (or an ancestor) has been
628 * @throws IllegalStateException if this node (or an ancestor) has been
641 * preference node has no value associated with <tt>key</tt>
644 * <tt>key</tt> in this preference node, or <tt>def</tt> if the
647 * @throws IllegalStateException if this node (or an ancestor) has been
670 * <p>This implementation obtains this preference node's lock, checks that
671 * the node has not been removed and invokes {@link #keysSpi()}.
674 * preference node.
678 * @throws IllegalStateException if this node (or an ancestor) has been
694 * <p>This implementation obtains this preference node's lock, checks that
695 * the node has not been removed, constructs a <tt>TreeSet</tt> initialized
696 * to the names of children already cached (the children in this node's
702 * @return the names of the children of this preference node.
706 * @throws IllegalStateException if this node (or an ancestor) has been
725 * Returns all known unremoved children of this node.
727 * @return all known unremoved children of this node.
740 * <p>This implementation obtains this preference node's lock, checks that
741 * the node has not been removed and returns the parent value that was
742 * passed to this node's constructor.
744 * @return the parent of this preference node.
745 * @throws IllegalStateException if this node (or an ancestor) has been
758 * Implements the <tt>node</tt> method as per the specification in
759 * {@link Preferences#node(String)}.
761 * <p>This implementation obtains this preference node's lock and checks
762 * that the node has not been removed. If <tt>path</tt> is <tt>""</tt>,
763 * this node is returned; if <tt>path</tt> is <tt>"/"</tt>, this node's
766 * tokens and recursively traverses the path from this node to the
767 * named node, "consuming" a name and a slash from <tt>path</tt> at
768 * each step of the traversal. At each step, the current node is locked
769 * and the node's child-cache is checked for the named node. If it is
772 * method is invoked, and the result stored in this node's child-cache.
774 * field is <tt>true</tt> and there are any node change listeners,
785 * (indicating an absolute path name) this preference node's
788 * (rather than starting from this node). The traversal is otherwise
790 * the lock on this node prior to commencing the traversal at the root
791 * node is essential to avoid the possibility of deadlock, as per the
794 * @param path the path name of the preference node to return.
795 * @return the specified preference node.
799 * @throws IllegalStateException if this node (or an ancestor) has been
802 public Preferences node(String path) {
811 return node(new StringTokenizer(path, "/", true));
815 return root.node(new StringTokenizer(path.substring(1), "/", true));
821 private Preferences node(StringTokenizer path) {
841 return child.node(path);
849 * <p>This implementation is very similar to {@link #node(String)},
853 * @param path the path name of the node whose existence is to be checked.
854 * @return true if the specified node exists.
861 * @throws IllegalStateException if this node (or an ancestor) has been
913 * <p>This implementation checks to see that this node is the root; if so,
914 * it throws an appropriate exception. Then, it locks this node's parent,
916 * this node. The recursive method locks the node on which it was called,
923 * the helper method calls itself recursively on each node contained in its
926 * if there are any node change listeners, it enqueues a notification
932 * @throws IllegalStateException if this node (or an ancestor) has already
935 * the root node.
985 * passed to this node's constructor.
987 * @return this preference node's name, relative to its parent.
998 * was computed at the time that this node was constructed (based on
999 * the name that was passed to this node's constructor, and the names
1000 * that were passed to this node's ancestors' constructors).
1002 * @return this preference node's absolute path name.
1012 * <p>This implementation compares this node's root node (which is stored
1017 * @return <tt>true</tt> if this preference node is in the user
1116 * Put the given key-value association into this preference node. It is
1118 * legal length. Also, it is guaranteed that this node has not been
1121 * <p>This method is invoked with the lock on this node held.
1127 * node, or <tt>null</tt> if there is no association for this key, or the
1129 * <tt>key</tt> is non-null. Also, it is guaranteed that this node has
1138 * <p>This method is invoked with the lock on this node held.
1141 * node, or <tt>null</tt> if there is no association for this
1148 * preference node. It is guaranteed that <tt>key</tt> is non-null.
1149 * Also, it is guaranteed that this node has not been removed.
1152 * <p>This method is invoked with the lock on this node held.
1157 * Removes this preference node, invalidating it and any preferences that
1161 * a node's descendants before removing the node itself).
1163 * <p>This method is invoked with the lock held on this node and its
1167 * <p>The removal of a node needn't become persistent until the
1168 * <tt>flush</tt> method is invoked on this node (or an ancestor).
1170 * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
1182 * preference node. (The returned array will be of size zero if
1183 * this node has no preferences.) It is guaranteed that this node has not
1186 * <p>This method is invoked with the lock on this node held.
1188 * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
1192 * preference node.
1200 * Returns the names of the children of this preference node. (The
1201 * returned array will be of size zero if this node has no children.)
1205 * <p>This method is invoked with the lock on this node held.
1207 * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
1212 * preference node.
1225 * that this node has not been removed. (The implementor needn't check
1228 * <p>Finally, it is guaranteed that the named node has not been returned
1235 * <p>This implementation obtains this preference node's lock, invokes
1236 * {@link #childrenNames()} to get an array of the names of this node's
1238 * with the specified node name. If a child node has the correct name,
1240 * node is returned. If the iteration completes without finding the
1262 * Returns the named child of this preference node, creating it if it does
1266 * this node has not been removed. (The implementor needn't check for any
1269 * <p>Finally, it is guaranteed that the named node has not been returned
1276 * <p>The implementer must ensure that the returned node has not been
1277 * removed. If a like-named child of this node was previously removed, the
1279 * node; once removed, an <tt>AbstractPreferences</tt> node
1282 * <p>If this method causes a node to be created, this node is not
1284 * invoked on this node or one of its ancestors (or descendants).
1286 * <p>This method is invoked with the lock on this node held.
1288 * @param name The name of the child node to return, relative to
1289 * this preference node.
1290 * @return The named child node.
1295 * Returns the absolute path name of this preferences node.
1307 * node, invokes syncSpi() on it, unlocks this node, and recursively
1309 * of this node that has been created in this VM and not subsequently
1311 * "cached subtree" rooted at this node, calling syncSpi() on each node in
1312 * the subTree while only that node is locked. Note that syncSpi() is
1318 * @throws IllegalStateException if this node (or an ancestor) has been
1341 * This method is invoked with this node locked. The contract of this
1342 * method is to synchronize any cached preferences stored at this node
1344 * this node does not exist on the backing store, either because it has
1347 * any subnodes of this node. If the backing store naturally syncs an
1351 * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
1365 * node, invokes flushSpi() on it, unlocks this node, and recursively
1367 * of this node that has been created in this VM and not subsequently
1369 * "cached subtree" rooted at this node, calling flushSpi() on each node in
1370 * the subTree while only that node is locked. Note that flushSpi() is
1373 * <p> If this method is invoked on a node that has been removed with
1374 * the {@link #removeNode()} method, flushSpi() is invoked on this node,
1401 * This method is invoked with this node locked. The contract of this
1403 * preference node to the backing store, guaranteeing their persistence.
1404 * (It is perfectly possible that this node does not exist on the backing
1407 * flush the preferences in any subnodes of this node. If the backing
1412 * <p>If this node throws a <tt>BackingStoreException</tt>, the exception
1422 * Returns <tt>true</tt> iff this node (or an ancestor) has been
1424 * locks this node prior to returning the contents of the private
1427 * @return <tt>true</tt> iff this node (or an ancestor) has been
1437 * Queue of pending notification events. When a preference or node
1524 * Return this node's preference/node change listeners. Even though
1555 * Enqueue a "node added" event for delivery to registered node change
1569 * Enqueue a "node removed" event for delivery to registered node change