railo.runtime.lock
Class LockManagerImpl

java.lang.Object
  extended by railo.runtime.lock.LockManagerImpl
All Implemented Interfaces:
LockManager

public final class LockManagerImpl
extends Object
implements LockManager

Lock mnager to make a log by a string name


Field Summary
 
Fields inherited from interface railo.runtime.lock.LockManager
TYPE_EXCLUSIVE, TYPE_READONLY
 
Method Summary
 void clean()
           
static LockManager getInstance(boolean caseSensitive)
           
 String[] getOpenLockNames()
           
 LockData lock(int type, String name, int timeout, int pageContextId)
          locks a thread if already a other thread is come until other thread notify him by unlock method
 void unlock(LockData data)
          unlocks a locked thread in lock method
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static LockManager getInstance(boolean caseSensitive)

lock

public LockData lock(int type,
                     String name,
                     int timeout,
                     int pageContextId)
              throws LockTimeoutException,
                     InterruptedException
Description copied from interface: LockManager
locks a thread if already a other thread is come until other thread notify him by unlock method

Specified by:
lock in interface LockManager
name - Lock Name (not case sensitive)
timeout - tiemout to for waiting in this method, if timeout occurs "lockTiemoutException" will be throwd
Returns:
lock data object key for unlocking this lock
Throws:
LockTimeoutException
InterruptedException

unlock

public void unlock(LockData data)
Description copied from interface: LockManager
unlocks a locked thread in lock method

Specified by:
unlock in interface LockManager

getOpenLockNames

public String[] getOpenLockNames()
Specified by:
getOpenLockNames in interface LockManager

clean

public void clean()
Specified by:
clean in interface LockManager


Copyright © 2012 Railo