Class SchedulingLockUtils
java.lang.Object
overit.geocallapp.wfm.scheduling.bl.lock.SchedulingLockUtils
The Class that defines the Scheduling Lock Utils.
- Since:
- 18.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic SchedulingLockacquireLock(Long operationCenter, Long schedulingModel, Set<Long> resources, Set<Long> operations, int timeout) This method acquires a new lockstatic voidaddOperations(SchedulingLock schedulingLock, Set<Long> operations, int timeout) This method add a set of operations to the lockstatic voidaddResources(SchedulingLock schedulingLock, Set<Long> resources, int timeout) This method add a set of resources to the lockstatic voidextendLock(SchedulingLock schedulingLock, int timeout) This method extends a lockstatic voidreleaseLock(SchedulingLock schedulingLock) This method releases a lock
-
Method Details
-
acquireLock
public static SchedulingLock acquireLock(Long operationCenter, Long schedulingModel, Set<Long> resources, Set<Long> operations, int timeout) throws DAException, DAValidateException This method acquires a new lock- Parameters:
operationCenter- the operation center to be lockedschedulingModel- the scheduling model to be lockedresources- the resources to be lockedoperations- the operations to be lockedtimeout- the timeout after which the lock expires- Throws:
DAExceptionDAValidateException
-
extendLock
public static void extendLock(SchedulingLock schedulingLock, int timeout) throws DAException, DAValidateException This method extends a lock- Parameters:
schedulingLock- the scheduling locktimeout- the timeout- Throws:
DAExceptionDAValidateException
-
releaseLock
public static void releaseLock(SchedulingLock schedulingLock) throws DAException, DAValidateException This method releases a lock- Parameters:
schedulingLock- the scheduling lock- Throws:
DAExceptionDAValidateException
-
addOperations
public static void addOperations(SchedulingLock schedulingLock, Set<Long> operations, int timeout) throws DAException, DAValidateException This method add a set of operations to the lock- Parameters:
schedulingLock- the scheduling lockoperations- the operations to addtimeout- the timeout- Throws:
DAExceptionDAValidateException
-
addResources
public static void addResources(SchedulingLock schedulingLock, Set<Long> resources, int timeout) throws DAException, DAValidateException This method add a set of resources to the lock- Parameters:
schedulingLock- the scheduling lockresources- the resources to addtimeout- the timeout- Throws:
DAExceptionDAValidateException
-