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.PessimisticUnversionedNode<K,V>
org.jboss.cache.VersionedNode<K,V>
- All Implemented Interfaces:
- InternalNode<K,V>
Deprecated. will be removed along with optimistic and pessimistic locking.
@Deprecated
public class VersionedNode<K,V>
- extends PessimisticUnversionedNode<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 AT jboss DOT org)
Methods inherited from class org.jboss.cache.PessimisticUnversionedNode |
addChildDirect, addChildDirect, addChildDirect, addChildDirect, addChildDirect, getChildDirect, getChildDirect, getChildrenDirect, getChildrenDirect, getChildrenMapDirect, getLock, getOrCreateChild, injectDependencies, injectLockStrategyFactory, markAsRemoved, printDetailsInMap, releaseObjectReferences, setChildrenMapDirect, setFqn, setValid, toString |
Methods inherited from class org.jboss.cache.UnversionedNode |
addChild, addChild, addChild, clear, containsKey, copyDataMap, copyInternals, downgradeDataMapIfNeeded, get, getCache, getChild, getChild, getChildren, getChildren, getChildrenMap, getChildrenNames, getData, getDelegate, getFqn, getKeys, hasChildren, initFlags, isChildrenLoaded, isDataLoaded, isLockForChildInsertRemove, isValid, printDetails, printIndent, put, putAll, remove, removeChild, removeChild, removeChildren, setChildrenLoaded, setChildrenMap, setDataLoaded, setDelegate, setLockForChildInsertRemove, upgradeDataMap |
VersionedNode
public VersionedNode(Fqn fqn,
NodeSPI<K,V> parent,
Map<K,V> data,
CacheSPI<K,V> cache)
- Deprecated.
getVersion
public DataVersion getVersion()
- Deprecated.
- Returns the version id of this node.
- Specified by:
getVersion
in interface InternalNode<K,V>
- Overrides:
getVersion
in class AbstractNode<K,V>
- Returns:
- the version
getParent
public NodeSPI<K,V> getParent()
- Deprecated.
- Returns the parent.
- Specified by:
getParent
in interface InternalNode<K,V>
- Overrides:
getParent
in class UnversionedNode<K,V>
setVersion
public void setVersion(DataVersion version)
- Deprecated.
- Sets the version id of this node.
- Specified by:
setVersion
in interface InternalNode<K,V>
- Overrides:
setVersion
in class AbstractNode<K,V>
- Parameters:
version
-
initLock
protected void initLock()
- Deprecated.
- Optimistically locked nodes (VersionedNodes) will always use repeatable read.
- Overrides:
initLock
in class PessimisticUnversionedNode<K,V>
getInternalState
public Map getInternalState(boolean onlyInternalState)
- Deprecated.
- Specified by:
getInternalState
in interface InternalNode<K,V>
- Overrides:
getInternalState
in class UnversionedNode<K,V>
setInternalState
public void setInternalState(Map state)
- Deprecated.
- Specified by:
setInternalState
in interface InternalNode<K,V>
- Overrides:
setInternalState
in class UnversionedNode<K,V>
copy
public VersionedNode copy()
- Deprecated.
- Description copied from interface:
InternalNode
- Creates a new instance of the same type and copies internal state. Note that a shallow copy is made for all fields
except the data map, where a new map is created.
- Specified by:
copy
in interface InternalNode<K,V>
- Overrides:
copy
in class PessimisticUnversionedNode<K,V>
- Returns:
- a copy.
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.