|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.cache.AbstractNode<K,V> org.jboss.cache.UnversionedNode<K,V>
public class UnversionedNode<K,V>
Basic data node class. Throws UnsupportedOperationException
for version-specific methods like AbstractNode.getVersion()
and
AbstractNode.setVersion(org.jboss.cache.optimistic.DataVersion)
, defined in NodeSPI
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jboss.cache.AbstractNode |
---|
AbstractNode.NodeFlags |
Field Summary | |
---|---|
protected CacheSPI<K,V> |
cache
|
protected Map<K,V> |
data
Map of general data keys to values. |
protected NodeSPI<K,V> |
delegate
|
protected static org.apache.commons.logging.Log |
log
Debug log. |
protected static boolean |
trace
|
Fields inherited from class org.jboss.cache.AbstractNode |
---|
children, flags, fqn |
Constructor Summary | |
---|---|
UnversionedNode()
Constructs a new node with an FQN of Root. |
|
UnversionedNode(Fqn fqn)
Constructs a new node a given Fqn |
|
UnversionedNode(Fqn fqn,
CacheSPI<K,V> cache,
boolean lockForChildInsertRemove)
|
|
UnversionedNode(Fqn fqn,
CacheSPI<K,V> cache,
boolean lockForChildInsertRemove,
Map<K,V> data)
|
Method Summary | |
---|---|
void |
addChild(InternalNode<K,V> child)
|
void |
addChild(InternalNode<K,V> child,
boolean safe)
Same as above, except that if safe is true, any Fqn ancestry checking is skipped. |
void |
addChild(Object nodeName,
InternalNode<K,V> nodeToAdd)
|
void |
clear()
|
boolean |
containsKey(K key)
|
InternalNode<K,V> |
copy()
Creates a new instance of the same type and copies internal state. |
protected Map |
copyDataMap(Map<? extends K,? extends V> toCopyFrom)
|
protected void |
copyInternals(UnversionedNode n)
|
protected void |
downgradeDataMapIfNeeded()
|
V |
get(K key)
|
CacheSPI<K,V> |
getCache()
|
InternalNode<K,V> |
getChild(Fqn f)
|
InternalNode<K,V> |
getChild(Object childName)
|
Set<InternalNode<K,V>> |
getChildren()
|
Set<InternalNode<K,V>> |
getChildren(boolean includeMarkedForRemoval)
|
ConcurrentMap<Object,InternalNode<K,V>> |
getChildrenMap()
|
Set<Object> |
getChildrenNames()
|
Map<K,V> |
getData()
|
NodeSPI<K,V> |
getDelegate()
|
Fqn |
getFqn()
Returns the name of this node. |
Map |
getInternalState(boolean onlyInternalState)
|
Set<K> |
getKeys()
|
NodeSPI<K,V> |
getParent()
Returns a parent by checking the TreeMap by name. |
boolean |
hasChildren()
|
protected void |
initFlags()
This method initialises flags on the node, by setting DATA_LOADED to true and VALID to true and all other flags to false. |
boolean |
isChildrenLoaded()
|
boolean |
isDataLoaded()
Returns true if the data was loaded from the cache loader. |
boolean |
isLockForChildInsertRemove()
|
boolean |
isValid()
|
void |
markAsRemoved(boolean marker,
boolean recursive)
|
void |
printDetails(StringBuilder sb,
int indent)
|
protected void |
printDetailsInMap(StringBuilder sb,
int indent)
Adds details of the node into a map as strings. |
protected void |
printIndent(StringBuilder sb,
int indent)
|
V |
put(K key,
V value)
|
void |
putAll(Map<? extends K,? extends V> data)
|
void |
releaseObjectReferences(boolean recursive)
|
V |
remove(K key)
|
boolean |
removeChild(Fqn f)
|
boolean |
removeChild(Object childName)
|
void |
removeChildren()
|
void |
setChildrenLoaded(boolean childrenLoaded)
|
void |
setChildrenMap(ConcurrentMap<Object,InternalNode<K,V>> children)
|
void |
setDataLoaded(boolean dataLoaded)
Sets if the data was loaded from the cache loader. |
void |
setDelegate(NodeSPI<K,V> delegate)
|
void |
setFqn(Fqn fqn)
Sets the node's Fqn |
void |
setInternalState(Map state)
|
void |
setLockForChildInsertRemove(boolean lockForChildInsertRemove)
|
void |
setValid(boolean valid,
boolean recursive)
|
String |
toString()
Returns a debug string. |
protected void |
upgradeDataMap()
|
Methods inherited from class org.jboss.cache.AbstractNode |
---|
addChildDirect, addChildDirect, addChildDirect, addChildDirect, addChildDirect, equals, getChildDirect, getChildDirect, getChildrenDirect, getChildrenDirect, getChildrenMapDirect, getLock, getOrCreateChild, getVersion, hashCode, isFlagSet, isRemoved, isResident, setChildrenMapDirect, setFlag, setFlag, setRemoved, setResident, setVersion, unsetFlag |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jboss.cache.InternalNode |
---|
addChildDirect, addChildDirect, addChildDirect, addChildDirect, addChildDirect, getChildDirect, getChildDirect, getChildrenDirect, getChildrenDirect, getChildrenMapDirect, getLock, getOrCreateChild, getVersion, isRemoved, isResident, setChildrenMapDirect, setRemoved, setResident, setVersion |
Field Detail |
---|
protected static org.apache.commons.logging.Log log
protected static final boolean trace
protected Map<K,V> data
protected NodeSPI<K,V> delegate
protected CacheSPI<K,V> cache
Constructor Detail |
---|
public UnversionedNode()
public UnversionedNode(Fqn fqn)
fqn
- fqn of the nodepublic UnversionedNode(Fqn fqn, CacheSPI<K,V> cache, boolean lockForChildInsertRemove)
public UnversionedNode(Fqn fqn, CacheSPI<K,V> cache, boolean lockForChildInsertRemove, Map<K,V> data)
Method Detail |
---|
protected void initFlags()
AbstractNode.NodeFlags
enum.
public NodeSPI<K,V> getDelegate()
public void setDelegate(NodeSPI<K,V> delegate)
public NodeSPI<K,V> getParent()
getParent
in interface InternalNode<K,V>
public CacheSPI<K,V> getCache()
getCache
in interface InternalNode<K,V>
public boolean isChildrenLoaded()
isChildrenLoaded
in interface InternalNode<K,V>
public void setChildrenLoaded(boolean childrenLoaded)
setChildrenLoaded
in interface InternalNode<K,V>
public V get(K key)
get
in interface InternalNode<K,V>
public Map<K,V> getData()
getData
in interface InternalNode<K,V>
public V put(K key, V value)
put
in interface InternalNode<K,V>
public InternalNode<K,V> getChild(Fqn f)
getChild
in interface InternalNode<K,V>
getChild
in class AbstractNode<K,V>
public InternalNode<K,V> getChild(Object childName)
getChild
in interface InternalNode<K,V>
getChild
in class AbstractNode<K,V>
public Set<InternalNode<K,V>> getChildren()
getChildren
in interface InternalNode<K,V>
getChildren
in class AbstractNode<K,V>
public Set<InternalNode<K,V>> getChildren(boolean includeMarkedForRemoval)
getChildren
in interface InternalNode<K,V>
getChildren
in class AbstractNode<K,V>
public ConcurrentMap<Object,InternalNode<K,V>> getChildrenMap()
getChildrenMap
in interface InternalNode<K,V>
getChildrenMap
in class AbstractNode<K,V>
public void setChildrenMap(ConcurrentMap<Object,InternalNode<K,V>> children)
setChildrenMap
in interface InternalNode<K,V>
setChildrenMap
in class AbstractNode<K,V>
public void addChild(Object nodeName, InternalNode<K,V> nodeToAdd)
addChild
in interface InternalNode<K,V>
addChild
in class AbstractNode<K,V>
public void addChild(InternalNode<K,V> child)
addChild
in interface InternalNode<K,V>
addChild
in class AbstractNode<K,V>
public void addChild(InternalNode<K,V> child, boolean safe)
InternalNode
addChild
in interface InternalNode<K,V>
addChild
in class AbstractNode<K,V>
child
- child to addsafe
- safety flagpublic V remove(K key)
remove
in interface InternalNode<K,V>
public void printDetails(StringBuilder sb, int indent)
printDetails
in interface InternalNode<K,V>
public String toString()
toString
in class Object
public void clear()
clear
in interface InternalNode<K,V>
public Set<Object> getChildrenNames()
getChildrenNames
in interface InternalNode<K,V>
public Set<K> getKeys()
getKeys
in interface InternalNode<K,V>
public boolean containsKey(K key)
containsKey
in interface InternalNode<K,V>
public boolean removeChild(Object childName)
removeChild
in interface InternalNode<K,V>
public boolean removeChild(Fqn f)
removeChild
in interface InternalNode<K,V>
public void putAll(Map<? extends K,? extends V> data)
putAll
in interface InternalNode<K,V>
protected final void upgradeDataMap()
protected final void downgradeDataMapIfNeeded()
public void removeChildren()
removeChildren
in interface InternalNode<K,V>
public void markAsRemoved(boolean marker, boolean recursive)
markAsRemoved
in interface InternalNode<K,V>
markAsRemoved
in class AbstractNode<K,V>
protected final void printIndent(StringBuilder sb, int indent)
public Fqn getFqn()
getFqn
in interface InternalNode<K,V>
public void setFqn(Fqn fqn)
InternalNode
setFqn
in interface InternalNode<K,V>
fqn
- Fqn to set topublic boolean hasChildren()
hasChildren
in interface InternalNode<K,V>
protected void printDetailsInMap(StringBuilder sb, int indent)
public boolean isDataLoaded()
isDataLoaded
in interface InternalNode<K,V>
public void setDataLoaded(boolean dataLoaded)
setDataLoaded
in interface InternalNode<K,V>
public boolean isValid()
isValid
in interface InternalNode<K,V>
public void setValid(boolean valid, boolean recursive)
setValid
in interface InternalNode<K,V>
public boolean isLockForChildInsertRemove()
isLockForChildInsertRemove
in interface InternalNode<K,V>
public void setLockForChildInsertRemove(boolean lockForChildInsertRemove)
setLockForChildInsertRemove
in interface InternalNode<K,V>
public InternalNode<K,V> copy()
InternalNode
copy
in interface InternalNode<K,V>
protected void copyInternals(UnversionedNode n)
public void setInternalState(Map state)
setInternalState
in interface InternalNode<K,V>
protected final Map copyDataMap(Map<? extends K,? extends V> toCopyFrom)
public Map getInternalState(boolean onlyInternalState)
getInternalState
in interface InternalNode<K,V>
public void releaseObjectReferences(boolean recursive)
releaseObjectReferences
in interface InternalNode<K,V>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |