org.jboss.cache.lock
Class PessimisticNodeBasedLockManager

java.lang.Object
  extended by org.jboss.cache.lock.AbstractLockManager
      extended by org.jboss.cache.lock.NodeBasedLockManager
          extended by org.jboss.cache.lock.PessimisticNodeBasedLockManager
All Implemented Interfaces:
LockManager

Deprecated. will be removed with pessimistic locking

@Deprecated
public class PessimisticNodeBasedLockManager
extends NodeBasedLockManager

Contains specific methods for the PessimisticLockInterceptor.

Author:
Manik Surtani (manik AT jboss DOT org)

Field Summary
 
Fields inherited from class org.jboss.cache.lock.NodeBasedLockManager
dataContainer, rootNode
 
Fields inherited from class org.jboss.cache.lock.AbstractLockManager
configuration, lockAcquisitionTimeout
 
Constructor Summary
PessimisticNodeBasedLockManager()
          Deprecated.  
 
Method Summary
 boolean lockPessimistically(InvocationContext ctx, Fqn fqn, LockType lockType, boolean createIfNotExists, boolean zeroLockTimeout, boolean acquireWriteLockOnParent, boolean reverseRemoveCheck, List<NodeSPI> createdNodes, boolean skipNotification)
          Deprecated. A specific lock method for the PessimisticLockInterceptor.
 
Methods inherited from class org.jboss.cache.lock.NodeBasedLockManager
getReadOwners, getReadOwners, getWriteOwner, getWriteOwner, inject, isLocked, isLocked, isLocked, lock, lock, lock, lock, lockAll, lockAll, lockAll, lockAllAndRecord, lockAllAndRecord, lockAndRecord, lockAndRecord, ownsLock, ownsLock, ownsLock, printLockInfo, printLockInfo, setRootNode, unlock, unlock, unlock, unlockAll, unlockAll
 
Methods inherited from class org.jboss.cache.lock.AbstractLockManager
getLockOwner, injectConfiguration, setLockAcquisitionTimeout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PessimisticNodeBasedLockManager

public PessimisticNodeBasedLockManager()
Deprecated. 
Method Detail

lockPessimistically

public boolean lockPessimistically(InvocationContext ctx,
                                   Fqn fqn,
                                   LockType lockType,
                                   boolean createIfNotExists,
                                   boolean zeroLockTimeout,
                                   boolean acquireWriteLockOnParent,
                                   boolean reverseRemoveCheck,
                                   List<NodeSPI> createdNodes,
                                   boolean skipNotification)
                            throws InterruptedException
Deprecated. 
A specific lock method for the PessimisticLockInterceptor. It should *not* be used anywhere else as it has very peculiar and specific characteristics.

For implementations of this LockManager interface that are not intended for use with the PessimisticLockInterceptor, it is okay not to implement this method (a no-op).

Parameters:
fqn - Fqn to lock
lockType - Type of lock to acquire
ctx - invocation context
createIfNotExists - if true, nodes will be created if they do not exist.
zeroLockTimeout - if true uses 0 as a lock acquisition timeout
acquireWriteLockOnParent - if true, write locks are acquired on parent nodes when child nodes need write locks.
reverseRemoveCheck - if true, nodes that have been marked as removed in the current transaction may be reversed.
createdNodes - a list to which nodes created in this method may be added.
skipNotification - if true, node creation notifications are suppressed.
Returns:
true if successful; false otherwise.
Throws:
InterruptedException - if interrupted


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