|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IResourceLocks
Method Summary | |
---|---|
void |
checkTimeouts(ITransaction transaction,
boolean temporary)
Deletes LockedObjects, where timeout has reached. |
boolean |
exclusiveLock(ITransaction transaction,
String path,
String owner,
int depth,
int timeout)
Tries to lock the resource at "path" exclusively. |
LockedObject |
getLockedObjectByID(ITransaction transaction,
String id)
Gets the LockedObject corresponding to specified id. |
LockedObject |
getLockedObjectByPath(ITransaction transaction,
String path)
Gets the LockedObject on specified path. |
LockedObject |
getTempLockedObjectByID(ITransaction transaction,
String id)
Gets the LockedObject corresponding to specified id (locktoken). |
LockedObject |
getTempLockedObjectByPath(ITransaction transaction,
String path)
Gets the LockedObject on specified path. |
boolean |
lock(ITransaction transaction,
String path,
String owner,
boolean exclusive,
int depth,
int timeout,
boolean temporary)
Tries to lock the resource at "path". |
boolean |
sharedLock(ITransaction transaction,
String path,
String owner,
int depth,
int timeout)
Tries to lock the resource at "path" shared. |
boolean |
unlock(ITransaction transaction,
String id,
String owner)
Unlocks all resources at "path" (and all subfolders if existing) that have the same owner. |
void |
unlockTemporaryLockedObjects(ITransaction transaction,
String path,
String owner)
Unlocks all resources at "path" (and all subfolders if existing) that have the same owner. |
Method Detail |
---|
boolean lock(ITransaction transaction, String path, String owner, boolean exclusive, int depth, int timeout, boolean temporary) throws LockFailedException
transaction
- path
- what resource to lockowner
- the owner of the lockexclusive
- if the lock should be exclusive (or shared)depth
- depthtimeout
- Lock Duration in seconds.temporary
-
LockFailedException
boolean unlock(ITransaction transaction, String id, String owner)
transaction
- id
- id to the resource to unlockowner
- who wants to unlock
void unlockTemporaryLockedObjects(ITransaction transaction, String path, String owner)
transaction
- path
- what resource to unlockowner
- who wants to unlockvoid checkTimeouts(ITransaction transaction, boolean temporary)
transaction
- temporary
- Check timeout on temporary or real locksboolean exclusiveLock(ITransaction transaction, String path, String owner, int depth, int timeout) throws LockFailedException
transaction
- Transactionpath
- what resource to lockowner
- the owner of the lockdepth
- depthtimeout
- Lock Duration in seconds.
LockFailedException
boolean sharedLock(ITransaction transaction, String path, String owner, int depth, int timeout) throws LockFailedException
transaction
- Transactionpath
- what resource to lockowner
- the owner of the lockdepth
- depthtimeout
- Lock Duration in seconds.
LockFailedException
LockedObject getLockedObjectByID(ITransaction transaction, String id)
transaction
- id
- LockToken to requested resource
LockedObject getLockedObjectByPath(ITransaction transaction, String path)
transaction
- path
- Path to requested resource
LockedObject getTempLockedObjectByID(ITransaction transaction, String id)
transaction
- id
- LockToken to requested resource
LockedObject getTempLockedObjectByPath(ITransaction transaction, String path)
transaction
- path
- Path to requested resource
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |