org.neo4j.kernel.ha
Class SlaveLockManager

java.lang.Object
  extended by org.neo4j.kernel.impl.transaction.LockManager
      extended by org.neo4j.kernel.ha.SlaveLockManager

public class SlaveLockManager
extends LockManager


Nested Class Summary
static class SlaveLockManager.SlaveLockManagerFactory
           
 
Constructor Summary
SlaveLockManager(TransactionManager tm, TxHook txHook, Broker broker, ResponseReceiver receiver)
           
 
Method Summary
 void getReadLock(Object resource)
          Tries to acquire read lock on resource for the current transaction.
 void getWriteLock(Object resource)
          Tries to acquire write lock on resource for the current transaction.
 
Methods inherited from class org.neo4j.kernel.impl.transaction.LockManager
dumpAllLocks, dumpLocksOnResource, dumpRagStack, getDetectedDeadlockCount, releaseReadLock, releaseWriteLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlaveLockManager

public SlaveLockManager(TransactionManager tm,
                        TxHook txHook,
                        Broker broker,
                        ResponseReceiver receiver)
Method Detail

getReadLock

public void getReadLock(Object resource)
                 throws DeadlockDetectedException,
                        IllegalResourceException
Description copied from class: LockManager
Tries to acquire read lock on resource for the current transaction. If read lock can't be acquired the transaction will wait for the lransaction until it can acquire it. If waiting leads to dead lock a DeadlockDetectedException will be thrown.

Overrides:
getReadLock in class LockManager
Parameters:
resource - The resource
Throws:
DeadlockDetectedException - If a deadlock is detected
IllegalResourceException

getWriteLock

public void getWriteLock(Object resource)
                  throws DeadlockDetectedException,
                         IllegalResourceException
Description copied from class: LockManager
Tries to acquire write lock on resource for the current transaction. If write lock can't be acquired the transaction will wait for the lock until it can acquire it. If waiting leads to dead lock a DeadlockDetectedException will be thrown.

Overrides:
getWriteLock in class LockManager
Parameters:
resource - The resource
Throws:
DeadlockDetectedException - If a deadlock is detected
IllegalResourceException


Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.