Author: manik.surtani(a)jboss.com
Date: 2008-11-17 18:35:40 -0500 (Mon, 17 Nov 2008)
New Revision: 7151
Modified:
core/branches/flat/src/main/java/org/jboss/starobrno/tree/Node.java
core/branches/flat/src/main/java/org/jboss/starobrno/tree/NodeImpl.java
core/branches/flat/src/main/java/org/jboss/starobrno/tree/TreeCache.java
Log:
Javadocs
Modified: core/branches/flat/src/main/java/org/jboss/starobrno/tree/Node.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/Node.java 2008-11-17
23:26:21 UTC (rev 7150)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/tree/Node.java 2008-11-17
23:35:40 UTC (rev 7151)
@@ -27,7 +27,7 @@
import java.util.Set;
/**
- * A Node is a {@link Fqn named} logical grouping of data in the JBoss {@link Cache}.
+ * A Node is a {@link Fqn named} logical grouping of data in the {@link TreeCache} API of
JBoss {@link Cache}.
* A node should be used to contain data for a single data record, for example
* information about a particular person or account.
* <p/>
@@ -35,9 +35,6 @@
* locking interference, and increase concurrency. So for example, when multiple threads
or
* possibly distributed caches are acccessing different accounts simultaneously.
* <p/>
- * Another is that when making changes to this node, its data might be kept in a single
- * database row or file on disk. (Persisted via the use of a {@link
org.jboss.cache.loader.CacheLoader}.)
- * <p/>
* A node has references to its children, parent (each node except the root - defined by
{@link Fqn#ROOT} - has
* a single parent) and data contained within the node (as key/value pairs). The
* data access methods are similar to the collections {@link Map} interface,
@@ -45,8 +42,7 @@
* <p/>
*
* @author <a href="mailto:manik AT jboss DOT org">Manik Surtani (manik
AT jboss DOT org)</a>
- * @see Cache
- * @since 2.0.0
+ * @see org.jboss.starobrno.tree.TreeCache
*/
@ThreadSafe
public interface Node<K, V>
Modified: core/branches/flat/src/main/java/org/jboss/starobrno/tree/NodeImpl.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/NodeImpl.java 2008-11-17
23:26:21 UTC (rev 7150)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/tree/NodeImpl.java 2008-11-17
23:35:40 UTC (rev 7151)
@@ -30,10 +30,9 @@
import java.util.Set;
/**
- * // TODO: MANIK: Document this
+ * Implementation backed by an {@link AtomicMap}
*
* @author Manik Surtani (<a href="mailto:manik AT jboss DOT org">manik
AT jboss DOT org</a>)
- * @since 3.0
*/
public class NodeImpl<K, V> extends TreeStructureSupport implements Node<K,
V>
{
Modified: core/branches/flat/src/main/java/org/jboss/starobrno/tree/TreeCache.java
===================================================================
--- core/branches/flat/src/main/java/org/jboss/starobrno/tree/TreeCache.java 2008-11-17
23:26:21 UTC (rev 7150)
+++ core/branches/flat/src/main/java/org/jboss/starobrno/tree/TreeCache.java 2008-11-17
23:35:40 UTC (rev 7151)
@@ -37,10 +37,23 @@
import java.util.Set;
/**
- * // TODO: MANIK: Document this
+ * This is a tree-like facade around a {@link Cache} allowing for efficient tree-style
access to cached data.
+ * <p/>
+ * The primary purpose of this interface is to allow for efficient caching of tree-like
structures such as directories,
+ * as well as to provide a compatibility layer with JBoss Cache 3.x and earlier.
+ * <p/>
+ * For most purposes, we expect people to use the {@link Cache} interface directly as it
is simpler.
+ * <p/>
+ * The tree API assumes that a collection of {@link Node}s, organized in a tree structure
underneath a root node,
+ * contains key/value attributes of data.
+ * <p/>
+ * Any locking happens on a node-level granularity, which means that all attributes on a
node are atomic and in terms of
+ * locking, is coarse grained. At the same time, replication is fine grained, and only
modified attributes in a Node
+ * are replicated.
+ * <p/>
*
* @author Manik Surtani (<a href="mailto:manik AT jboss DOT org">manik
AT jboss DOT org</a>)
- * @since 3.0
+ * @see Node
*/
public interface TreeCache<K, V> extends Lifecycle
{
Show replies by date