com.caucho.env.lock
Class LockService

java.lang.Object
  extended by com.caucho.env.service.AbstractResinSubSystem
      extended by com.caucho.env.lock.LockService
All Implemented Interfaces:
ResinSubSystem

public class LockService
extends AbstractResinSubSystem

Manages the distributed lock


Field Summary
 
Fields inherited from interface com.caucho.env.service.ResinSubSystem
START_PRIORITY_CACHE_SERVICE, START_PRIORITY_CLASSLOADER, START_PRIORITY_CLUSTER_SERVICE, START_PRIORITY_DEFAULT, START_PRIORITY_ENV_SYSTEM, START_PRIORITY_NETWORK_CLUSTER
 
Constructor Summary
LockService(AbstractLockManager lockManager)
           
 
Method Summary
static LockService createAndAddService(AbstractLockManager lockManager)
           
static LockService getCurrent()
           
 LockManager getManager()
           
 java.util.concurrent.locks.Lock getOrCreateLock(java.lang.String name)
          Creates a new lock with the given name;
 void start()
          Starts the service.
 void stop()
          Stops the service.
 
Methods inherited from class com.caucho.env.service.AbstractResinSubSystem
destroy, getStartPriority, getStopPriority, preCreate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LockService

public LockService(AbstractLockManager lockManager)
Method Detail

createAndAddService

public static LockService createAndAddService(AbstractLockManager lockManager)

getCurrent

public static LockService getCurrent()

getManager

public LockManager getManager()

getOrCreateLock

public java.util.concurrent.locks.Lock getOrCreateLock(java.lang.String name)
Creates a new lock with the given name;


start

public void start()
Description copied from interface: ResinSubSystem
Starts the service.

Specified by:
start in interface ResinSubSystem
Overrides:
start in class AbstractResinSubSystem

stop

public void stop()
Description copied from interface: ResinSubSystem
Stops the service.

Specified by:
stop in interface ResinSubSystem
Overrides:
stop in class AbstractResinSubSystem