Interface CentralWorkQueue.Enqueue

Enclosing interface:
CentralWorkQueue

public static interface CentralWorkQueue.Enqueue
Builder interface for the enqueueing of a new task.
  • Method Details

    • locks

      CentralWorkQueue.Enqueue locks(String resourceType)
      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

      CentralWorkQueue.Enqueue locks(String resourceType, @Nullable String id)
      Configure a lock for the resource with the given type and id. Note if the id is null the whole resource type is locked. For more information on locks see the class documentation (CentralWorkQueue).
      Parameters:
      resourceType - resource type to lock
      id - id of resource to lock
      Returns:
      this
      See Also:
    • locks

      default CentralWorkQueue.Enqueue locks(String resourceType, ModelObject object)
      Configure a lock for the resource with the given type and the id from the given ModelObject. For more information on locks see the class documentation (CentralWorkQueue).
      Parameters:
      resourceType - resource type to lock
      object - which holds the id of the resource to lock
      Returns:
      this
      See Also:
    • runAsAdmin

      Run the enqueued task with administrator permission.
      Returns:
      this
    • enqueue

      void enqueue(Task task)
      Enqueue the given task to CentralWorkQueue. Warning: Ensure that the task is serializable. If the task is not serializable an NonPersistableTaskException will be thrown. For more information about the persistence of tasks see class documentation.
      Parameters:
      task - serializable task to enqueue
      See Also:
    • enqueue

      void enqueue(Class<? extends Runnable> task)
      Enqueue the given task to CentralWorkQueue.
      Parameters:
      task - task to enqueue