Package sonia.scm.work
Interface CentralWorkQueue.Enqueue
- Enclosing interface:
- CentralWorkQueue
public static interface CentralWorkQueue.Enqueue
Builder interface for the enqueueing of a new task.
-
Method Summary
Modifier and TypeMethodDescriptionvoidEnqueue the given task toCentralWorkQueue.voidEnqueue the given task toCentralWorkQueue.Configure a lock for the given resource type.Configure a lock for the resource with the given type and id.default CentralWorkQueue.Enqueuelocks(String resourceType, ModelObject object) Configure a lock for the resource with the given type and the id from the givenModelObject.Run the enqueued task with administrator permission.
-
Method Details
-
locks
Configure a lock for the given resource type. For more information on locks see the class documentation (CentralWorkQueue).- Parameters:
resourceType- resource type to lock- Returns:
this- See Also:
-
locks
Configure a lock for the resource with the given type and id. Note if the id isnullthe whole resource type is locked. For more information on locks see the class documentation (CentralWorkQueue).- Parameters:
resourceType- resource type to lockid- id of resource to lock- Returns:
this- See Also:
-
locks
Configure a lock for the resource with the given type and the id from the givenModelObject. For more information on locks see the class documentation (CentralWorkQueue).- Parameters:
resourceType- resource type to lockobject- which holds the id of the resource to lock- Returns:
this- See Also:
-
runAsAdmin
CentralWorkQueue.Enqueue runAsAdmin()Run the enqueued task with administrator permission.- Returns:
this
-
enqueue
Enqueue the given task toCentralWorkQueue. Warning: Ensure that the task is serializable. If the task is not serializable anNonPersistableTaskExceptionwill be thrown. For more information about the persistence of tasks see class documentation.- Parameters:
task- serializable task to enqueue- See Also:
-
enqueue
Enqueue the given task toCentralWorkQueue.- Parameters:
task- task to enqueue
-