org.jboss.cache
Class PessimisticUnversionedNode<K,V>

java.lang.Object
  extended by org.jboss.cache.AbstractNode<K,V>
      extended by org.jboss.cache.UnversionedNode<K,V>
          extended by org.jboss.cache.PessimisticUnversionedNode<K,V>
All Implemented Interfaces:
InternalNode<K,V>
Direct Known Subclasses:
VersionedNode

Deprecated. will be removed along with optimistic and pessimistic locking.

@Deprecated
public class PessimisticUnversionedNode<K,V>
extends UnversionedNode<K,V>

UnversionedNode specific to pessimistic locking, with legacy code.

Since:
3.0
Author:
Manik Surtani (manik AT jboss DOT org)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.cache.AbstractNode
AbstractNode.NodeFlags
 
Field Summary
protected  IdentityLock lock
          Deprecated. Lock manager that manages locks to be acquired when accessing the node inside a transaction.
protected  LockStrategyFactory lockStrategyFactory
          Deprecated.  
protected  NodeFactory<K,V> nodeFactory
          Deprecated.  
 
Fields inherited from class org.jboss.cache.UnversionedNode
cache, data, delegate, log, trace
 
Fields inherited from class org.jboss.cache.AbstractNode
children, flags, fqn
 
Constructor Summary
PessimisticUnversionedNode(Object name, Fqn fqn, Map<K,V> data, CacheSPI<K,V> cache)
          Deprecated.  
 
Method Summary
 NodeSPI<K,V> addChildDirect(Fqn f)
          Deprecated.  
 NodeSPI<K,V> addChildDirect(Fqn f, boolean notify)
          Deprecated.  
 void addChildDirect(NodeSPI<K,V> child)
          Deprecated.  
 NodeSPI<K,V> addChildDirect(Object o, boolean notify)
          Deprecated.  
 void addChildDirect(Object nodeName, Node<K,V> nodeToAdd)
          Deprecated.  
 InternalNode<K,V> copy()
          Deprecated. Creates a new instance of the same type and copies internal state.
 NodeSPI<K,V> getChildDirect(Fqn fqn)
          Deprecated.  
 NodeSPI<K,V> getChildDirect(Object childName)
          Deprecated.  
 Set<NodeSPI<K,V>> getChildrenDirect()
          Deprecated.  
 Set<NodeSPI<K,V>> getChildrenDirect(boolean includeMarkedForRemoval)
          Deprecated.  
 Map<Object,Node<K,V>> getChildrenMapDirect()
          Deprecated.  
 IdentityLock getLock()
          Deprecated.  
 NodeSPI<K,V> getOrCreateChild(Object childName, GlobalTransaction gtx)
          Deprecated.  
protected  void initLock()
          Deprecated.  
 void injectDependencies(CacheSPI<K,V> spi, CommandsFactory commandsFactory, NodeFactory<K,V> nodeFactory)
          Deprecated.  
 void injectLockStrategyFactory(LockStrategyFactory lockStrategyFactory)
          Deprecated.  
 void markAsRemoved(boolean marker, boolean recursive)
          Deprecated.  
protected  void printDetailsInMap(StringBuilder sb, int indent)
          Deprecated. Adds details of the node into a map as strings.
 void releaseObjectReferences(boolean recursive)
          Deprecated.  
 void setChildrenMapDirect(Map<Object,Node<K,V>> children)
          Deprecated.  
 void setFqn(Fqn fqn)
          Deprecated. Sets the node's Fqn
 void setValid(boolean valid, boolean recursive)
          Deprecated.  
 String toString()
          Deprecated. Returns a debug string.
 
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, getInternalState, getKeys, getParent, hasChildren, initFlags, isChildrenLoaded, isDataLoaded, isLockForChildInsertRemove, isValid, printDetails, printIndent, put, putAll, remove, removeChild, removeChild, removeChildren, setChildrenLoaded, setChildrenMap, setDataLoaded, setDelegate, setInternalState, setLockForChildInsertRemove, upgradeDataMap
 
Methods inherited from class org.jboss.cache.AbstractNode
equals, getVersion, hashCode, isFlagSet, isRemoved, isResident, 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
getVersion, isRemoved, isResident, setRemoved, setResident, setVersion
 

Field Detail

lock

protected transient IdentityLock lock
Deprecated. 
Lock manager that manages locks to be acquired when accessing the node inside a transaction. Lazy set just in case locking is not needed.


lockStrategyFactory

protected LockStrategyFactory lockStrategyFactory
Deprecated. 

nodeFactory

protected NodeFactory<K,V> nodeFactory
Deprecated. 
Constructor Detail

PessimisticUnversionedNode

public PessimisticUnversionedNode(Object name,
                                  Fqn fqn,
                                  Map<K,V> data,
                                  CacheSPI<K,V> cache)
Deprecated. 
Method Detail

injectLockStrategyFactory

public void injectLockStrategyFactory(LockStrategyFactory lockStrategyFactory)
Deprecated. 

injectDependencies

public void injectDependencies(CacheSPI<K,V> spi,
                               CommandsFactory commandsFactory,
                               NodeFactory<K,V> nodeFactory)
Deprecated. 

initLock

protected void initLock()
Deprecated. 

getLock

public IdentityLock getLock()
Deprecated. 
Specified by:
getLock in interface InternalNode<K,V>
Overrides:
getLock in class AbstractNode<K,V>

toString

public String toString()
Deprecated. 
Description copied from class: UnversionedNode
Returns a debug string.

Overrides:
toString in class UnversionedNode<K,V>

copy

public InternalNode<K,V> 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 UnversionedNode<K,V>
Returns:
a copy.

addChildDirect

public void addChildDirect(NodeSPI<K,V> child)
Deprecated. 
Specified by:
addChildDirect in interface InternalNode<K,V>
Overrides:
addChildDirect in class AbstractNode<K,V>

addChildDirect

public NodeSPI<K,V> addChildDirect(Fqn f,
                                   boolean notify)
Deprecated. 
Specified by:
addChildDirect in interface InternalNode<K,V>
Overrides:
addChildDirect in class AbstractNode<K,V>

addChildDirect

public NodeSPI<K,V> addChildDirect(Object o,
                                   boolean notify)
Deprecated. 
Specified by:
addChildDirect in interface InternalNode<K,V>
Overrides:
addChildDirect in class AbstractNode<K,V>

getChildDirect

public NodeSPI<K,V> getChildDirect(Fqn fqn)
Deprecated. 
Specified by:
getChildDirect in interface InternalNode<K,V>
Overrides:
getChildDirect in class AbstractNode<K,V>

getChildDirect

public NodeSPI<K,V> getChildDirect(Object childName)
Deprecated. 
Specified by:
getChildDirect in interface InternalNode<K,V>
Overrides:
getChildDirect in class AbstractNode<K,V>

getChildrenDirect

public Set<NodeSPI<K,V>> getChildrenDirect()
Deprecated. 
Specified by:
getChildrenDirect in interface InternalNode<K,V>
Overrides:
getChildrenDirect in class AbstractNode<K,V>

getChildrenMapDirect

public Map<Object,Node<K,V>> getChildrenMapDirect()
Deprecated. 
Specified by:
getChildrenMapDirect in interface InternalNode<K,V>
Overrides:
getChildrenMapDirect in class AbstractNode<K,V>

setChildrenMapDirect

public void setChildrenMapDirect(Map<Object,Node<K,V>> children)
Deprecated. 
Specified by:
setChildrenMapDirect in interface InternalNode<K,V>
Overrides:
setChildrenMapDirect in class AbstractNode<K,V>

addChildDirect

public void addChildDirect(Object nodeName,
                           Node<K,V> nodeToAdd)
Deprecated. 
Specified by:
addChildDirect in interface InternalNode<K,V>
Overrides:
addChildDirect in class AbstractNode<K,V>

getChildrenDirect

public Set<NodeSPI<K,V>> getChildrenDirect(boolean includeMarkedForRemoval)
Deprecated. 
Specified by:
getChildrenDirect in interface InternalNode<K,V>
Overrides:
getChildrenDirect in class AbstractNode<K,V>

addChildDirect

public NodeSPI<K,V> addChildDirect(Fqn f)
Deprecated. 
Specified by:
addChildDirect in interface InternalNode<K,V>
Overrides:
addChildDirect in class AbstractNode<K,V>

getOrCreateChild

public NodeSPI<K,V> getOrCreateChild(Object childName,
                                     GlobalTransaction gtx)
Deprecated. 
Specified by:
getOrCreateChild in interface InternalNode<K,V>
Overrides:
getOrCreateChild in class AbstractNode<K,V>

markAsRemoved

public void markAsRemoved(boolean marker,
                          boolean recursive)
Deprecated. 
Specified by:
markAsRemoved in interface InternalNode<K,V>
Overrides:
markAsRemoved in class UnversionedNode<K,V>

setValid

public void setValid(boolean valid,
                     boolean recursive)
Deprecated. 
Specified by:
setValid in interface InternalNode<K,V>
Overrides:
setValid in class UnversionedNode<K,V>

printDetailsInMap

protected void printDetailsInMap(StringBuilder sb,
                                 int indent)
Deprecated. 
Adds details of the node into a map as strings.

Overrides:
printDetailsInMap in class UnversionedNode<K,V>

setFqn

public void setFqn(Fqn fqn)
Deprecated. 
Description copied from interface: InternalNode
Sets the node's Fqn

Specified by:
setFqn in interface InternalNode<K,V>
Overrides:
setFqn in class UnversionedNode<K,V>
Parameters:
fqn - Fqn to set to

releaseObjectReferences

public void releaseObjectReferences(boolean recursive)
Deprecated. 
Specified by:
releaseObjectReferences in interface InternalNode<K,V>
Overrides:
releaseObjectReferences in class UnversionedNode<K,V>


Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.