Class LocalTaskQueue

java.lang.Object
com.google.appengine.tools.development.AbstractLocalRpcService
com.google.appengine.api.taskqueue.dev.LocalTaskQueue
All Implemented Interfaces:
LocalRpcService

@AutoService(LocalRpcService.class) public final class LocalTaskQueue extends AbstractLocalRpcService
A local implementation of the Task Queue service interface backed by Quartz (http://www.opensymphony.com/quartz). This class is responsible for managing the lifecycle of the Quartz Scheduler but otherwise delegates to DevQueue for all the scheduling intelligence.
  • Field Details

  • Constructor Details

    • LocalTaskQueue

      public LocalTaskQueue()
  • Method Details

    • init

      public void init(LocalServiceContext context, Map<String,String> properties)
      Description copied from interface: LocalRpcService
      Initializes the service with a set of configuration properties. Must be called before a service is started.
      Specified by:
      init in interface LocalRpcService
      Overrides:
      init in class AbstractLocalRpcService
      Parameters:
      context - A context object for the application
      properties - A read-only Map of properties.
    • start

      public void start()
      Description copied from interface: LocalRpcService
      Puts a new service into "serving" mode. Aside from setting properties, the service is not functional until after having been started.
      Specified by:
      start in interface LocalRpcService
      Overrides:
      start in class AbstractLocalRpcService
    • stop

      public void stop()
      Description copied from interface: LocalRpcService
      Stops the service, releasing all of its resources.
      Specified by:
      stop in interface LocalRpcService
      Overrides:
      stop in class AbstractLocalRpcService
    • getPackage

      public String getPackage()
      Description copied from interface: LocalRpcService
      Returns the package for the service, for example, "datastore_v3".
      Returns:
      a not null package name.
    • add

      public com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueAddResponse add(LocalRpcService.Status status, com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueAddRequest addRequest)
    • fetchQueueStats

      public com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueFetchQueueStatsResponse fetchQueueStats(LocalRpcService.Status status, com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueFetchQueueStatsRequest fetchQueueStatsRequest)
      FetchQueueStats RPC implementation.
    • purgeQueue

      public com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueuePurgeQueueResponse purgeQueue(LocalRpcService.Status status, com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueuePurgeQueueRequest purgeQueueRequest)
      PurgeQueue RPC implementation.
    • bulkAdd

      public com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueBulkAddResponse bulkAdd(LocalRpcService.Status status, com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueBulkAddRequest bulkAddRequest)
      BulkAdd RPC implementation.
    • delete

      public com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueDeleteResponse delete(LocalRpcService.Status status, com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueDeleteRequest request)
      Delete RPC implementation.
    • queryAndOwnTasks

      public com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueQueryAndOwnTasksResponse queryAndOwnTasks(LocalRpcService.Status status, com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueQueryAndOwnTasksRequest request)
    • modifyTaskLease

      public com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueModifyTaskLeaseResponse modifyTaskLease(LocalRpcService.Status status, com.google.appengine.api.taskqueue.TaskQueuePb.TaskQueueModifyTaskLeaseRequest request)
    • getQueueStateInfo

      public Map<String,QueueStateInfo> getQueueStateInfo()
      Returns a map of QueueStateInfo objects keyed by queue name.

      This is not part of the public interface. It is used by the dev server admin console Task Queue Viewer function.

    • flushQueue

      public void flushQueue(String queueName)
      Remove all entries from a queue.
    • deleteTask

      public boolean deleteTask(String queueName, String taskName)
      Delete a task by name.
      Returns:
      False if the task name was not found.
    • runTask

      public boolean runTask(String queueName, String taskName)
      Run a task by name.
      Returns:
      False if the task name was not found.
    • getMaximumDeadline

      public Double getMaximumDeadline(boolean isOfflineRequest)
      Description copied from interface: LocalRpcService
      Return the maximum number of seconds that is allowed as a deadline for each API call. The user cannot request a deadline higher than this value. This method may return null if the service has no opinion about the maximum deadline, in which case a global maximum deadline will be used instead.
      Specified by:
      getMaximumDeadline in interface LocalRpcService
      Overrides:
      getMaximumDeadline in class AbstractLocalRpcService