Class SchedulingLock
java.lang.Object
overit.geocallapp.wfm.scheduling.bl.lock.SchedulingLock
The SchedulingLock class is responsible for managing locks on resources,
activities, and operation centers to ensure exclusive access during scheduling operations.
This class provides methods to add resources, activities, and operation centers to the lock,
and to acquire, extend and release the lock using a specified lock service.
The lock service can be dynamically selected based on the type, allowing for flexibility
in switching between different implementations (e.g., Redis or database).
- Since:
- 18.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the base lock keyReturns the lock service to be used for acquiring and releasing locks.Returns the lock typeReturns a set of operations to be locked.Returns a set of resources to be locked.getUuid()Returns the unique identifier (UUID) for the lock, used to group and manage locks for a specific transactionvoidsetBaseLockKey(String baseLockKey) Sets the base lock keyvoidsetLockService(LockService lockService) Sets the lock service to be used for acquiring and releasing locks.voidsetLockType(Long lockType) Sets the lock typevoidsetOperations(Set<Long> operations) Sets a set of operations to be locked.voidsetResources(Set<Long> resources) Sets a set of resources to be locked.voidSets the unique identifier (UUID) for the lock, used to group and manage locks for a specific transaction
-
Field Details
-
TOTAL_OPERATION_CENTER_LOCK
-
PARTIAL_OPERATION_CENTER_LOCK
-
-
Constructor Details
-
SchedulingLock
public SchedulingLock()
-
-
Method Details
-
getLockService
Returns the lock service to be used for acquiring and releasing locks.- Returns:
- the lock service to be used
-
setLockService
Sets the lock service to be used for acquiring and releasing locks.- Parameters:
lockService- the lock service to be used
-
getResources
Returns a set of resources to be locked.- Returns:
- resources to be locked
-
setResources
Sets a set of resources to be locked.- Parameters:
resources- the resources to be locked
-
getOperations
Returns a set of operations to be locked.- Returns:
- operations to be locked
-
setOperations
Sets a set of operations to be locked.- Parameters:
operations- the operations to be locked
-
getUuid
Returns the unique identifier (UUID) for the lock, used to group and manage locks for a specific transaction- Returns:
- the uuid to be set
-
setUuid
Sets the unique identifier (UUID) for the lock, used to group and manage locks for a specific transaction- Parameters:
uuid- the uuid to be set
-
getLockType
Returns the lock type- Returns:
- lockType the lock type to be set
-
setLockType
Sets the lock type- Parameters:
lockType- the lock type to be set
-
getBaseLockKey
Returns the base lock key- Returns:
- baseLockKey the base lock key to be set
-
setBaseLockKey
Sets the base lock key- Parameters:
baseLockKey- the base lock key to be set
-