com.deftlabs.lock.mongo
Interface DistributedLockSvc


public interface DistributedLockSvc

The distributed lock service interface.


Method Summary
 DistributedLock create(String pLockName)
          Create a new distributed lock.
 DistributedLock create(String pLockName, DistributedLockOptions pOptions)
          Create a new distributed lock.
 void destroy(DistributedLock pLock)
          Destroy a distributed lock.
 boolean isRunning()
          Returns true if the lock service is running.
 void shutdown()
          Part of the usage contract.
 void startup()
          Part of the usage contract.
 

Method Detail

create

DistributedLock create(String pLockName)
Create a new distributed lock. If a lock already exists with this name, the lock will be returned (else a new one is created).


create

DistributedLock create(String pLockName,
                       DistributedLockOptions pOptions)
Create a new distributed lock. If a lock already exists with this name, the lock will be returned (else a new one is created).


destroy

void destroy(DistributedLock pLock)
Destroy a distributed lock.


startup

void startup()
Part of the usage contract. The startup method is called by the factory.


shutdown

void shutdown()
Part of the usage contract. Must be called when the app stops.


isRunning

boolean isRunning()
Returns true if the lock service is running.