org.jboss.cache
Class VersionedNode<K,V>
java.lang.Object
org.jboss.cache.AbstractNode<K,V>
org.jboss.cache.UnversionedNode<K,V>
org.jboss.cache.VersionedNode<K,V>
public class VersionedNode<K,V>
- extends UnversionedNode<K,V>
VersionedNode extends the UnversionedNode
by adding a DataVersion
property.
Unlike UnversionedNode
, this node supports getVersion()
and setVersion(org.jboss.cache.optimistic.DataVersion)
defined in NodeSPI
Typically used when the cache mode configured is Configuration.NodeLockingScheme.OPTIMISTIC
- Since:
- 2.0.0
- Author:
- Manik Surtani (manik@jboss.org)
Methods inherited from class org.jboss.cache.UnversionedNode |
addChild, addChildDirect, addChildDirect, addChildDirect, addChildDirect, clearDataDirect, get, getCache, getChildDirect, getChildDirect, getChildrenDirect, getChildrenDirect, getChildrenMapDirect, getChildrenNamesDirect, getDataDirect, getDelegate, getDirect, getFqn, getKeysDirect, getLock, getOrCreateChild, hasChildrenDirect, initFlags, injectDependencies, isChildrenLoaded, isDataLoaded, isLockForChildInsertRemove, isValid, printDetails, put, putAll, putAllDirect, putDirect, releaseObjectReferences, remove, removeChildDirect, removeChildDirect, removeChildrenDirect, removeDirect, setChildrenLoaded, setChildrenMapDirect, setDataLoaded, setDelegate, setFqn, setLockForChildInsertRemove, setValid, toString |
Methods inherited from class org.jboss.cache.AbstractNode |
equals, hashCode, isDeleted, isFlagSet, isResident, markAsDeleted, markAsDeleted, setFlag, setFlag, setResident, unsetFlag |
VersionedNode
protected VersionedNode(Fqn fqn,
NodeSPI<K,V> parent,
Map<K,V> data,
CacheSPI<K,V> cache)
getVersion
public DataVersion getVersion()
- Returns the version id of this node.
- Overrides:
getVersion
in class UnversionedNode<K,V>
- Returns:
- the version
getParent
public NodeSPI<K,V> getParent()
- Returns the parent.
- Overrides:
getParent
in class UnversionedNode<K,V>
setVersion
public void setVersion(DataVersion version)
- Sets the version id of this node.
- Overrides:
setVersion
in class UnversionedNode<K,V>
- Parameters:
version
-
initLock
protected void initLock()
- Optimistically locked nodes (VersionedNodes) will always use repeatable read.
- Overrides:
initLock
in class UnversionedNode<K,V>
getInternalState
public Map getInternalState(boolean onlyInternalState)
- Overrides:
getInternalState
in class UnversionedNode<K,V>
setInternalState
public void setInternalState(Map state)
- Overrides:
setInternalState
in class UnversionedNode<K,V>
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.