TreeItems
that the user can open, close, and select. The root item cannot be displayed.
Cached meta-data about a single B-Tree within a {@link Volume}. A Tree
object keeps track of the Volume
, the index root page, the index depth, various other statistics and the {@link Accumulator}s for a B-Tree.
As of Persistit 3.3, this class supports version within transactions. A new Tree
created within the cope of a {@link Transaction} is notvisible within the other transactions until it commits. Similarly, if a Tree
is removed within the scope of a transaction, other transactions that started before the current transaction commits will continue to be able to read and write the Tree
. As a side-effect, the physical storage for a Tree
is not deallocated until there are no remaining active transactions that started before the commit timestamp of the current transaction. Concurrent transactions that attempt to create or remove the same Tree
instance are subject to a a write-write dependency (see {@link Transaction}); all but one such transaction must roll back.
Tree
instances are created by {@link Volume#getTree(String,boolean)}. If the Volume
already has a B-Tree with the specified name, then the Tree
object returned by getTree
reflects the stored information. Otherwise, getTree
can create a new B-Tree. In either case, the Tree
is merely a transient in-memory cache for the B-Tree information ultimately stored on disk.
Persistit ensures that Tree
instances are unique, that is, for a given Volume
and name, there is only one Tree
. if multiple threads call {@link Volume#getTree(String,boolean)} for the samename on the same volume, the first such call will create a new Tree
instance and subsequent calls will return the same instance.
Each Tree
may have up to 64 {@link Accumulator} instances thatmay be used to aggregate statistical information such as counters. Accumulator
s work within the MVCC transaction scheme to provide highly concurrent access to a small number of variables that would otherwise cause a significant performance degradation.
User: Zhang Kaitao
Date: 13-2-4 上午9:38
Version: 1.0
User: Zhang Kaitao
Date: 13-2-4 上午9:38
Version: 1.0
A Tree has no visual presentation, it is displayed by a {@link com.smartgwt.client.widgets.tree.TreeGrid} or {@link com.smartgwt.client.widgets.grid.ColumnTree} when supplied as {@link com.smartgwt.client.widgets.tree.TreeGrid#getData data} or {@link com.smartgwt.client.widgets.grid.ColumnTree#getData data}.
A Tree can be constructed out of a List of objects interlinked by IDs or via explicitly specified Arrays of child objects. See {@link com.smartgwt.client.widgets.tree.Tree#getModelType modelType} for an explanation of how to pass data to a Tree.
Typical usage is to call {@link com.smartgwt.client.widgets.tree.TreeGrid#fetchData TreeGrid.fetchData} to causeautomatic creation of a ResultTree, which is a type of Tree that automatically handles loading data on demand. For information on DataBinding Trees, see {@link com.smartgwt.client.docs.TreeDataBinding}.
WARNING: This interface and its sub-interfaces are subject to change as the Java™ programming language evolves. These interfaces are implemented by Sun's Java compiler (javac) and should not be implemented either directly or indirectly by other applications. @author Peter von der Ahé @author Jonathan Gibbons @since 1.6
Represents the tree of commits.
Thread-safety: This class is thread-safe.
@author Michel KraemerTree
is used to collect all of the tree types, and acts as a generic extendable type. This is the standard implementation of inheritance-based polymorphism. All Tree
objects support accessors for their children (a Tree[]
), their label (a Label
), and their score (a double
). However, different concrete implementations may or may not include the latter two, in which case a default value is returned. The class Tree defines no data fields. The two abstract methods that must be implemented are: children()
, and treeFactory()
. Notes that setChildren(Tree[])
is now an optional operation, whereas it was previously required to be implemented. There is now support for finding the parent of a tree. This may be done by search from a tree root, or via a directly stored parent. The Tree
class now implements the Collection
interface: in terms of this, each node of the tree is an element of the collection; hence one can explore the tree by using the methods of this interface. A Tree
is regarded as a read-only Collection
(even though the Tree
class has various methods that modify trees). Moreover, the implementation is not thread-safe: no attempt is made to detect and report concurrent modifications.
@author Christopher Manning
@author Dan Klein
@author Sarah Spikes (sdspikes@cs.stanford.edu) - filled in types
A tree is built from a set of {@link TreeRule}s. The rules are stored separately in the same row as the tree definition object, but can be loaded into the tree for processing and return from an RPC request. Building a tree consists of defining a tree, assigning one or more rules, and passing {@link net.opentsdb.meta.TSMeta} objects through the rule set using a {@link TreeBuilder}. Results are then stored in separate rows as branch and leaf objects.
If TSMeta collides with something that has already been processed by a rule set, a collision will be recorded, via this object, in a separate column in a separate row for collisions. Likewise, if a tree is set to {@code strict_match}, TSMetas that fail to match the rule set will be recorded to a separate row. This class provides helper methods for fetching and storing these collisions and non-matched items. @since 2.0
<html> <head> $headElements </head> <body> $tree $jsElements </body> </html>
All tree instances created in the context of a content session become invalid after the content session is closed. Any method called on an invalid tree instance will throw an {@code InvalidStateException}.
{@link Tree} instances may become non existing after a call to{@link Root#refresh()}, {@link Root#rebase()} or {@link Root#commit()}. Any write access to non existing {@code Tree} instances will cause an{@code InvalidStateException}.
The {@link #getChild(String)} method is special in that it neverreturns a {@code null} value, even if the named tree does not exist.Instead a client should use the {@link #exists()} method on the returnedtree to check whether that tree exists.
The iterability of a tree is a related to existence. A node state is iterable if it is included in the return values of the {@link #getChildrenCount(long)} and {@link #getChildren()} methods. An iterablenode is guaranteed to exist, though not all existing nodes are necessarily iterable.
Furthermore, a non-existing node is guaranteed to contain no properties or iterable child nodes. It can, however contain non-iterable children. Such scenarios are typically the result of access control restrictions.
<-- statically --> <s:tree id="..." label="..."> <s:treenode id="..." label="..." /> <s:treenode id="..." label="..."> <s:treenode id="..." label="..." /> <s:treenode id="..." label="..." /> &;lt;/s:treenode> <s:treenode id="..." label="..." /> </s:tree> <-- dynamically --> <s:tree id="..." rootNode="..." nodeIdProperty="..." nodeTitleProperty="..." childCollectionProperty="..." />@s.tag name="tree" tld-body-content="JSP" tld-tag-class="org.apache.struts2.views.jsp.ui.TreeTag"description="Render a tree widget."
Event:
Default {@link #getZclass}: z-tree, and an other option is z-dottree. (since 3.5.0) @author tomyeh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|