public interface IClusterLockingService
Modifier and Type | Field and Description |
---|---|
static String |
LOCKING_SERVICE_NAME |
static int |
TASK_LOCK_MAX_TIME |
static int |
TASK_LOCK_MAX_WAIT_TIME |
Modifier and Type | Method and Description |
---|---|
IClusterLock |
acquireLock(IURI uri,
long validTime,
long waitTime) |
IClusterLock |
acquireLock(IURI uri,
long validTime,
long waitTime,
boolean newChange)
Acquires distributed lock for the given task.
|
IClusterLock |
getLock(IURI uri)
Returns instance of any existing lock for the specified task instance
|
boolean |
isLightweightLocking()
Whether lock service uses lightweight locking.
|
void |
releaseLock(IClusterLock lock)
Releases previously acquired lock
|
void |
setLightweightLocking(boolean value)
Sets lightweight locking use.
|
static final String LOCKING_SERVICE_NAME
static final int TASK_LOCK_MAX_WAIT_TIME
static final int TASK_LOCK_MAX_TIME
IClusterLock acquireLock(IURI uri, long validTime, long waitTime, boolean newChange) throws PortalException
sourceURI
- source URI for the lock owneruri
- of the task to be lockedvalidTime
- time in millis the lock will be valid. 0 - indefinitewaitTime
- waiting time to acquire a lock. 0 - immediately exit if lock can not be obtained)PortalException
IClusterLock acquireLock(IURI uri, long validTime, long waitTime) throws PortalException
PortalException
void releaseLock(IClusterLock lock) throws PortalException
lock
- to be releasedPortalException
IClusterLock getLock(IURI uri) throws PortalException
uri
- uri of the task to return lock forPortalException
boolean isLightweightLocking()
void setLightweightLocking(boolean value)