| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.AbstractNode<K,V>
org.jboss.cache.optimistic.WorkspaceNodeImpl<K,V>
@Deprecated public class WorkspaceNodeImpl<K,V>
Wraps an ordinary Node and adds versioning and other meta data to it.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class org.jboss.cache.AbstractNode | 
|---|
| AbstractNode.NodeFlags | 
| Field Summary | 
|---|
| Fields inherited from class org.jboss.cache.AbstractNode | 
|---|
| children, flags, fqn | 
| Constructor Summary | |
|---|---|
| WorkspaceNodeImpl(NodeSPI<K,V> node,
                  TransactionWorkspace workspace,
                  NodeFactory<K,V> nodeFactory)Deprecated. Constructs with a node and workspace. | |
| Method Summary | |
|---|---|
|  void | addChild(WorkspaceNode<K,V> child)Deprecated. Adds a given WorkspaceNode to the current node's child map | 
|  NodeSPI<K,V> | addChildDirect(Fqn f)Deprecated. | 
|  void | clearData()Deprecated. | 
|  NodeSPI<K,V> | createChild(Object childName,
            NodeSPI<K,V> parent,
            CacheSPI<K,V> cache,
            DataVersion version)Deprecated. Creates a child node. | 
|  int | dataSize()Deprecated. | 
|  V | get(K key)Deprecated. | 
| protected  CacheSPI<K,V> | getCache()Deprecated. | 
|  NodeSPI<K,V> | getChildDirect(Fqn f)Deprecated. Overrides Node.getChild(Fqn)to return aNodeSPIrather than aNode | 
|  Set | getChildren()Deprecated. | 
| protected  Set<Fqn> | getChildrenAddedSet()Deprecated. | 
|  Set<Object> | getChildrenNames()Deprecated. | 
| protected  Set<Fqn> | getChildrenRemovedSet()Deprecated. | 
|  Map<K,V> | getData()Deprecated. | 
|  Fqn | getFqn()Deprecated. | 
|  Set<K> | getKeys()Deprecated. | 
|  List<Set<Fqn>> | getMergedChildren()Deprecated. Returns 2 Sets - a set of children added (first set) and a set of children removed. | 
|  Map<K,V> | getMergedData()Deprecated. Attempts to merge data changed during the current transaction with the data in the underlying tree. | 
|  NodeSPI<K,V> | getNode()Deprecated. Retrieves a reference to the underlying NodeSPIinstance. | 
|  NodeSPI<K,V> | getNodeSPI()Deprecated. | 
|  Node<K,V> | getParent()Deprecated. | 
|  TransactionWorkspace | getTransactionWorkspace()Deprecated. Retrieves a TransactionWorkspace instance associated with the current transaction, which the current WorkspaceNode instance lives in. | 
|  DataVersion | getVersion()Deprecated. Retrieves the data version of the in-memory node. | 
|  boolean | hasChild(Fqn f)Deprecated. | 
|  boolean | hasChild(Object o)Deprecated. | 
| protected  void | initFlags()Deprecated. | 
|  boolean | isChildrenLoaded()Deprecated. | 
|  boolean | isChildrenModified()Deprecated. | 
|  boolean | isCreated()Deprecated. | 
|  boolean | isDirty()Deprecated. A convenience method that returns whether a node is dirty, i.e., it has been created, deleted or modified. | 
|  boolean | isLockForChildInsertRemove()Deprecated. | 
|  boolean | isModified()Deprecated. Returns true if this node is modified. | 
|  boolean | isResurrected()Deprecated. | 
|  boolean | isValid()Deprecated. | 
|  boolean | isVersioningImplicit()Deprecated. Tests whether versioning for the WorkspaceNode instance in the current transaction is implicit (i.e., using DefaultDataVersionrather than a customDataVersionpassed in usingOption.setDataVersion(DataVersion)) | 
|  void | markAsCreated()Deprecated. Marks the instance as having been created in the current transaction. | 
|  void | markAsRemoved(boolean marker,
              boolean recursive)Deprecated. | 
|  void | markAsResurrected(boolean resurrected)Deprecated. Marks a node as resurrected, i.e., deleted and created again within the same transaction | 
|  V | put(K key,
    V value)Deprecated. | 
|  void | putAll(Map<K,V> data)Deprecated. | 
|  V | putIfAbsent(K k,
            V v)Deprecated. | 
|  void | releaseObjectReferences(boolean recursive)Deprecated. | 
|  V | remove(K key)Deprecated. | 
|  boolean | removeChild(Fqn f)Deprecated. | 
|  boolean | removeChild(Object childName)Deprecated. | 
|  V | replace(K key,
        V value)Deprecated. | 
|  boolean | replace(K key,
        V oldValue,
        V newValue)Deprecated. | 
|  void | replaceAll(Map<K,V> data)Deprecated. | 
|  void | setLockForChildInsertRemove(boolean lockForChildInsertRemove)Deprecated. | 
|  void | setVersion(DataVersion version)Deprecated. Sets the data version of this workspace node. | 
|  void | setVersioningImplicit(boolean versioningImplicit)Deprecated. Sets whether versioning for the WorkspaceNode instance in the current transaction is implicit (i.e., using DefaultDataVersionrather than a customDataVersionpassed in usingOption.setDataVersion(DataVersion)) | 
|  String | toString()Deprecated. | 
| Methods inherited from class org.jboss.cache.AbstractNode | 
|---|
| addChild, addChild, addChild, addChildDirect, addChildDirect, addChildDirect, addChildDirect, equals, getChild, getChild, getChildDirect, getChildren, getChildrenDirect, getChildrenDirect, getChildrenMap, getChildrenMapDirect, getLock, getOrCreateChild, hashCode, isFlagSet, isRemoved, isResident, setChildrenMap, setChildrenMapDirect, setFlag, setFlag, setRemoved, setResident, unsetFlag | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| Methods inherited from interface org.jboss.cache.optimistic.WorkspaceNode | 
|---|
| getChildDirect, isRemoved, setRemoved | 
| Constructor Detail | 
|---|
public WorkspaceNodeImpl(NodeSPI<K,V> node,
                         TransactionWorkspace workspace,
                         NodeFactory<K,V> nodeFactory)
| Method Detail | 
|---|
protected void initFlags()
protected Set<Fqn> getChildrenAddedSet()
protected Set<Fqn> getChildrenRemovedSet()
public boolean isChildrenModified()
isChildrenModified in interface WorkspaceNode<K,V>public boolean isChildrenLoaded()
isChildrenLoaded in interface WorkspaceNode<K,V>public boolean isResurrected()
isResurrected in interface WorkspaceNode<K,V>public void markAsResurrected(boolean resurrected)
WorkspaceNode
markAsResurrected in interface WorkspaceNode<K,V>
public void markAsRemoved(boolean marker,
                          boolean recursive)
markAsRemoved in interface WorkspaceNode<K,V>markAsRemoved in class AbstractNode<K,V>public boolean isModified()
isModified in interface WorkspaceNode<K,V>public boolean isDirty()
isDirty in interface WorkspaceNode<K,V>public Fqn getFqn()
getFqn in interface WorkspaceNode<K,V>public void putAll(Map<K,V> data)
putAll in interface WorkspaceNode<K,V>public void replaceAll(Map<K,V> data)
public V put(K key,
             V value)
put in interface WorkspaceNode<K,V>public V remove(K key)
remove in interface WorkspaceNode<K,V>public V get(K key)
get in interface WorkspaceNode<K,V>public Set<K> getKeys()
getKeys in interface WorkspaceNode<K,V>public Set<Object> getChildrenNames()
getChildrenNames in interface WorkspaceNode<K,V>public Node<K,V> getParent()
public NodeSPI<K,V> createChild(Object childName,
                                NodeSPI<K,V> parent,
                                CacheSPI<K,V> cache,
                                DataVersion version)
WorkspaceNode
createChild in interface WorkspaceNode<K,V>childName - Object name of the child to createparent - A reference to the parent nodecache - CacheSPI instance to create this node inversion - DataVersion to apply to the child.  If null, DefaultDataVersion.ZERO will be used.
public boolean isVersioningImplicit()
WorkspaceNodeDefaultDataVersion
 rather than a custom DataVersion passed in using Option.setDataVersion(DataVersion))
isVersioningImplicit in interface WorkspaceNode<K,V>public void setVersioningImplicit(boolean versioningImplicit)
WorkspaceNodeDefaultDataVersion
 rather than a custom DataVersion passed in using Option.setDataVersion(DataVersion))
setVersioningImplicit in interface WorkspaceNode<K,V>versioningImplicit - set to true if versioning is implicit, false otherwise.public NodeSPI<K,V> getNode()
WorkspaceNodeNodeSPI instance.
getNode in interface WorkspaceNode<K,V>public DataVersion getVersion()
WorkspaceNode
getVersion in interface WorkspaceNode<K,V>getVersion in class AbstractNode<K,V>public void setVersion(DataVersion version)
WorkspaceNode
setVersion in interface WorkspaceNode<K,V>setVersion in class AbstractNode<K,V>version - a DataVersion implementation.public List<Set<Fqn>> getMergedChildren()
WorkspaceNode
getMergedChildren in interface WorkspaceNode<K,V>public Map<K,V> getMergedData()
WorkspaceNode
getMergedData in interface WorkspaceNode<K,V>public TransactionWorkspace getTransactionWorkspace()
WorkspaceNode
getTransactionWorkspace in interface WorkspaceNode<K,V>public boolean isCreated()
isCreated in interface WorkspaceNode<K,V>public void markAsCreated()
WorkspaceNode
markAsCreated in interface WorkspaceNode<K,V>public Map<K,V> getData()
getData in interface WorkspaceNode<K,V>public String toString()
toString in class Objectpublic NodeSPI<K,V> addChildDirect(Fqn f)
addChildDirect in class AbstractNode<K,V>public void addChild(WorkspaceNode<K,V> child)
WorkspaceNode
addChild in interface WorkspaceNode<K,V>public void clearData()
clearData in interface WorkspaceNode<K,V>public int dataSize()
public boolean hasChild(Object o)
public boolean isValid()
public boolean isLockForChildInsertRemove()
public void setLockForChildInsertRemove(boolean lockForChildInsertRemove)
public void releaseObjectReferences(boolean recursive)
public NodeSPI<K,V> getChildDirect(Fqn f)
WorkspaceNodeNode.getChild(Fqn) to return a NodeSPI rather than a Node
getChildDirect in interface WorkspaceNode<K,V>getChildDirect in class AbstractNode<K,V>f - node fqn
public Set getChildren()
getChildren in class AbstractNode<K,V>public boolean hasChild(Fqn f)
public NodeSPI<K,V> getNodeSPI()
public V putIfAbsent(K k,
                     V v)
public V replace(K key,
                 V value)
public boolean replace(K key,
                       V oldValue,
                       V newValue)
public boolean removeChild(Fqn f)
public boolean removeChild(Object childName)
removeChild in interface WorkspaceNode<K,V>protected CacheSPI<K,V> getCache()
| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||