|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.cache.optimistic.WorkspaceNodeImpl
public class WorkspaceNodeImpl
Wraps a DataNode and adds versioning and other meta data to it.
| Constructor Summary | |
|---|---|
WorkspaceNodeImpl()
|
|
WorkspaceNodeImpl(DataNode node,
TransactionWorkspace workspace)
Constructs with a node and workspace. |
|
WorkspaceNodeImpl(TreeNode node,
TransactionWorkspace workspace)
Deprecated. |
|
| Method Summary | |
|---|---|
java.util.Set |
acquireAll(java.lang.Object caller,
long timeout,
int lock_type)
Deprecated. Will be removed in JBossCache 1.3. |
void |
addChild(java.lang.Object child_name,
TreeNode n)
Deprecated. Will be removed in JBossCache 1.3. |
void |
addChild(WorkspaceNode child)
|
boolean |
childExists(java.lang.Object child_name)
Deprecated. Will be removed in JBossCache 1.3. |
void |
clear()
Clears the data of this node. |
boolean |
containsKey(java.lang.Object key)
Deprecated. Will be removed in JBossCache 1.3. |
TreeNode |
createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent)
Creates a child node with a name, FQN, and parent. |
TreeNode |
createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent,
java.lang.Object key,
java.lang.Object value)
Deprecated. Will be removed in JBossCache 1.3. |
TreeNode |
createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent,
TreeCache cache,
DataVersion version)
|
java.lang.Object |
get(java.lang.Object key)
Returns the value of a key or null if it does not exist. |
TreeNode |
getChild(java.lang.Object childName)
Returns the named child of this node. |
java.util.Map |
getChildren()
Always returns null; dummy method for TreeNode compatibility. |
boolean |
getChildrenLoaded()
Deprecated. Will be removed in JBossCache 1.3. |
java.util.Set |
getChildrenNames()
|
java.util.Map |
getData()
Always returns null; dummy method for TreeNode compatibility. |
java.util.Set |
getDataKeys()
Deprecated. Will be removed in JBossCache 1.3. |
Fqn |
getFqn()
Returns the fully qualified name of the node. |
IdentityLock |
getImmutableLock()
Deprecated. Will be removed in JBossCache 1.3. |
java.util.Set |
getKeys()
|
IdentityLock |
getLock()
Deprecated. Will be removed in JBossCache 1.3. |
java.util.List |
getMergedChildren()
|
java.util.Map |
getMergedData()
|
java.lang.Object |
getName()
Returns the name of this node. |
DataNode |
getNode()
|
TreeNode |
getOrCreateChild(java.lang.Object child_name,
GlobalTransaction gtx,
boolean createIfNotExists)
Deprecated. Will be removed in JBossCache 1.3. |
TreeNode |
getParent()
Returns the parent of this node. |
TransactionWorkspace |
getTransactionWorkspace()
|
DataVersion |
getVersion()
|
TreeNode |
getWrappedChild(java.lang.Object fqn)
|
TreeNode |
getWrappedParent()
|
boolean |
hasChildren()
Deprecated. Will be removed in JBossCache 1.3. |
boolean |
isChildrenModified()
|
boolean |
isCreated()
|
boolean |
isDeleted()
|
boolean |
isDirty()
A convenience method that returns whether a node is dirty, i.e., it has been created, deleted or modified. |
boolean |
isLocked()
Deprecated. Will be removed in JBossCache 1.3. |
boolean |
isModified()
Returns true if this node is modified. |
boolean |
isVersioningImplicit()
|
void |
markAsCreated()
|
void |
markAsDeleted(boolean marker)
|
void |
markAsDeleted(boolean marker,
boolean recursive)
|
int |
numAttributes()
Deprecated. Will be removed in JBossCache 1.3. |
void |
print(java.lang.StringBuffer sb,
int indent)
Deprecated. Will be removed in JBossCache 1.3. |
void |
printDetails(java.lang.StringBuffer sb,
int indent)
Deprecated. Will be removed in JBossCache 1.3. |
void |
printIndent(java.lang.StringBuffer sb,
int indent)
Deprecated. Will be removed in JBossCache 1.3. |
void |
printLockInfo(java.lang.StringBuffer sb,
int indent)
Deprecated. Will be removed in JBossCache 1.3. |
void |
put(java.util.Map data)
Adds (merges) the contents of the map with the existing data. |
void |
put(java.util.Map data,
boolean eraseData)
Puts the contents of a map into this node. |
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value)
Puts the key and value into the node. |
void |
release(java.lang.Object caller)
Deprecated. Will be removed in JBossCache 1.3. |
void |
releaseAll(java.lang.Object owner)
Deprecated. Will be removed in JBossCache 1.3. |
void |
releaseAllForce()
Deprecated. Will be removed in JBossCache 1.3. |
void |
releaseForce()
Deprecated. Will be removed in JBossCache 1.3. |
java.lang.Object |
remove(java.lang.Object key)
Removes the old value of the key. |
void |
removeAllChildren()
Deprecated. Will be removed in JBossCache 1.3. |
void |
removeChild(java.lang.Object childName)
Removes the named child of this node. |
void |
setChildren(java.util.Map children)
Deprecated. Will be removed in JBossCache 1.3. |
void |
setChildrenLoaded(boolean b)
Deprecated. Will be removed in JBossCache 1.3. |
void |
setRecursiveTreeCacheInstance(TreeCache cache)
Deprecated. Will be removed in JBossCache 1.3. |
void |
setVersion(DataVersion version)
|
void |
setVersioningImplicit(boolean b)
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public WorkspaceNodeImpl()
public WorkspaceNodeImpl(TreeNode node,
TransactionWorkspace workspace)
public WorkspaceNodeImpl(DataNode node,
TransactionWorkspace workspace)
| Method Detail |
|---|
public boolean isChildrenModified()
isChildrenModified in interface WorkspaceNodepublic boolean isModified()
isModified in interface WorkspaceNodepublic boolean isDirty()
isDirty in interface WorkspaceNodepublic Fqn getFqn()
TreeNode
getFqn in interface TreeNode
public void put(java.util.Map data,
boolean eraseData)
TreeNode
put in interface TreeNodeeraseData - true to erase the existing contentspublic void put(java.util.Map data)
TreeNode
put in interface TreeNode
public java.lang.Object put(java.lang.Object key,
java.lang.Object value)
TreeNode
put in interface TreeNodepublic java.lang.Object remove(java.lang.Object key)
TreeNode
remove in interface TreeNodepublic void clear()
TreeNode
clear in interface TreeNodepublic java.lang.Object get(java.lang.Object key)
TreeNode
get in interface TreeNodepublic java.util.Set getKeys()
getKeys in interface WorkspaceNodepublic java.util.Set getChildrenNames()
getChildrenNames in interface WorkspaceNodepublic void removeChild(java.lang.Object childName)
TreeNode
removeChild in interface TreeNodepublic TreeNode getParent()
TreeNode
getParent in interface TreeNodepublic TreeNode getWrappedParent()
public TreeNode createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent)
TreeNode
createChild in interface TreeNode
public TreeNode createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent,
TreeCache cache,
DataVersion version)
createChild in interface WorkspaceNodepublic boolean isVersioningImplicit()
isVersioningImplicit in interface WorkspaceNodepublic void setVersioningImplicit(boolean b)
setVersioningImplicit in interface WorkspaceNodepublic TreeNode getChild(java.lang.Object childName)
TreeNode
getChild in interface TreeNodepublic TreeNode getWrappedChild(java.lang.Object fqn)
public DataNode getNode()
getNode in interface WorkspaceNodepublic DataVersion getVersion()
getVersion in interface WorkspaceNodepublic void setVersion(DataVersion version)
setVersion in interface WorkspaceNodepublic java.util.List getMergedChildren()
getMergedChildren in interface WorkspaceNodepublic java.util.Map getMergedData()
getMergedData in interface WorkspaceNodepublic void markAsDeleted(boolean marker)
markAsDeleted in interface WorkspaceNode
public void markAsDeleted(boolean marker,
boolean recursive)
public boolean isDeleted()
isDeleted in interface WorkspaceNodepublic java.lang.Object getName()
TreeNode
getName in interface TreeNodepublic TransactionWorkspace getTransactionWorkspace()
getTransactionWorkspace in interface WorkspaceNodepublic boolean isCreated()
isCreated in interface WorkspaceNodepublic void markAsCreated()
markAsCreated in interface WorkspaceNodepublic java.util.Map getData()
getData in interface TreeNodeDataNodepublic java.util.Map getChildren()
getChildren in interface TreeNodepublic boolean containsKey(java.lang.Object key)
TreeNode
containsKey in interface TreeNodeDataNodepublic java.util.Set getDataKeys()
TreeNode
getDataKeys in interface TreeNodeDataNodepublic boolean childExists(java.lang.Object child_name)
TreeNode
childExists in interface TreeNodeDataNodepublic IdentityLock getImmutableLock()
TreeNode
getImmutableLock in interface TreeNodeDataNodepublic IdentityLock getLock()
TreeNode
getLock in interface TreeNodeDataNodepublic int numAttributes()
TreeNode
numAttributes in interface TreeNodeDataNodepublic boolean hasChildren()
TreeNode
hasChildren in interface TreeNodeDataNode
public TreeNode getOrCreateChild(java.lang.Object child_name,
GlobalTransaction gtx,
boolean createIfNotExists)
getOrCreateChild in interface TreeNodeDataNode
public TreeNode createChild(java.lang.Object child_name,
Fqn fqn,
TreeNode parent,
java.lang.Object key,
java.lang.Object value)
TreeNode
createChild in interface TreeNodeDataNodepublic void removeAllChildren()
TreeNode
removeAllChildren in interface TreeNodeDataNode
public void print(java.lang.StringBuffer sb,
int indent)
TreeNode
print in interface TreeNodeDataNode
public void printDetails(java.lang.StringBuffer sb,
int indent)
TreeNode
printDetails in interface TreeNodeDataNode
public void printIndent(java.lang.StringBuffer sb,
int indent)
TreeNode
printIndent in interface TreeNodeDataNode
public void addChild(java.lang.Object child_name,
TreeNode n)
addChild in interface TreeNodeDataNode
public void printLockInfo(java.lang.StringBuffer sb,
int indent)
TreeNode
printLockInfo in interface TreeNodeDataNodepublic boolean isLocked()
TreeNode
isLocked in interface TreeNodeDataNodepublic void releaseAll(java.lang.Object owner)
TreeNode
releaseAll in interface TreeNodeDataNodepublic void releaseAllForce()
TreeNode
releaseAllForce in interface TreeNodeDataNode
public java.util.Set acquireAll(java.lang.Object caller,
long timeout,
int lock_type)
throws LockingException,
TimeoutException,
java.lang.InterruptedException
TreeNode
acquireAll in interface TreeNodeLockingException
TimeoutException
java.lang.InterruptedExceptionDataNodepublic void setRecursiveTreeCacheInstance(TreeCache cache)
TreeNode
setRecursiveTreeCacheInstance in interface TreeNodeDataNodepublic boolean getChildrenLoaded()
TreeNode
getChildrenLoaded in interface TreeNodeDataNodepublic void setChildrenLoaded(boolean b)
TreeNode
setChildrenLoaded in interface TreeNodeDataNodepublic void setChildren(java.util.Map children)
public void release(java.lang.Object caller)
TreeNode
release in interface TreeNodeDataNodepublic void releaseForce()
TreeNode
releaseForce in interface TreeNodeDataNodepublic java.lang.String toString()
toString in class java.lang.Objectpublic void addChild(WorkspaceNode child)
addChild in interface WorkspaceNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||