LocalTaskQueue

com.google.appengine.api.taskqueue.dev

Class LocalTaskQueue

  • java.lang.Object
    • AbstractLocalRpcService
      • com.google.appengine.api.taskqueue.dev.LocalTaskQueue


  • 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.
    • Constructor Summary

      Constructors 
      Constructor and Description
      LocalTaskQueue() 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      TaskQueueAddResponse add(Status status, TaskQueueAddRequest addRequest) 
      TaskQueueBulkAddResponse bulkAdd(Status status, TaskQueueBulkAddRequest bulkAddRequest)
      BulkAdd RPC implementation.
      TaskQueueDeleteResponse delete(Status status, TaskQueueDeleteRequest request)
      Delete RPC implementation.
      boolean deleteTask(java.lang.String queueName, java.lang.String taskName)
      Delete a task by name.
      TaskQueueFetchQueueStatsResponse fetchQueueStats(Status status, TaskQueueFetchQueueStatsRequest fetchQueueStatsRequest)
      FetchQueueStats RPC implementation.
      void flushQueue(java.lang.String queueName)
      Remove all entries from a queue.
      java.lang.Double getMaximumDeadline(boolean isOfflineRequest) 
      java.lang.String getPackage() 
      java.util.Map<java.lang.String,QueueStateInfo> getQueueStateInfo()
      Returns a map of QueueStateInfo objects keyed by queue name.
      void init(LocalServiceContext context, java.util.Map<java.lang.String,java.lang.String> properties) 
      TaskQueueModifyTaskLeaseResponse modifyTaskLease(Status status, TaskQueueModifyTaskLeaseRequest request) 
      TaskQueuePurgeQueueResponse purgeQueue(Status status, TaskQueuePurgeQueueRequest purgeQueueRequest)
      PurgeQueue RPC implementation.
      TaskQueueQueryAndOwnTasksResponse queryAndOwnTasks(Status status, TaskQueueQueryAndOwnTasksRequest request) 
      boolean runTask(java.lang.String queueName, java.lang.String taskName)
      Run a task by name.
      void start() 
      void stop() 
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • PACKAGE

        public static final java.lang.String PACKAGE
        The package name for this service.
        See Also:
        Constant Field Values
      • QUEUE_XML_PATH_PROP

        public static final java.lang.String QUEUE_XML_PATH_PROP
        Overrides the path of queue.xml. Must be a full path, e.g. /usr/local/dev/myapp/tests/queue.xml
        See Also:
        Constant Field Values
      • CALLBACK_CLASS_PROP

        public static final java.lang.String CALLBACK_CLASS_PROP
        Overrides the LocalTaskQueueCallback class that is used to service async task execution. The value of this property must be the fully-qualified name of a class with a public, no-arg constructor that implements the LocalTaskQueueCallback interface.
        See Also:
        Constant Field Values
    • Constructor Detail

      • LocalTaskQueue

        public LocalTaskQueue()
    • Method Detail

      • init

        public void init(LocalServiceContext context,
                         java.util.Map<java.lang.String,java.lang.String> properties)
      • start

        public void start()
      • stop

        public void stop()
      • getPackage

        public java.lang.String getPackage()
      • add

        public TaskQueueAddResponse add(Status status,
                                        TaskQueueAddRequest addRequest)
      • fetchQueueStats

        public TaskQueueFetchQueueStatsResponse fetchQueueStats(Status status,
                                                                TaskQueueFetchQueueStatsRequest fetchQueueStatsRequest)
        FetchQueueStats RPC implementation.
      • purgeQueue

        public TaskQueuePurgeQueueResponse purgeQueue(Status status,
                                                      TaskQueuePurgeQueueRequest purgeQueueRequest)
        PurgeQueue RPC implementation.
      • bulkAdd

        public TaskQueueBulkAddResponse bulkAdd(Status status,
                                                TaskQueueBulkAddRequest bulkAddRequest)
        BulkAdd RPC implementation.
      • delete

        public TaskQueueDeleteResponse delete(Status status,
                                              TaskQueueDeleteRequest request)
        Delete RPC implementation.
      • queryAndOwnTasks

        public TaskQueueQueryAndOwnTasksResponse queryAndOwnTasks(Status status,
                                                                  TaskQueueQueryAndOwnTasksRequest request)
      • modifyTaskLease

        public TaskQueueModifyTaskLeaseResponse modifyTaskLease(Status status,
                                                                TaskQueueModifyTaskLeaseRequest request)
      • getQueueStateInfo

        public java.util.Map<java.lang.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(java.lang.String queueName)
        Remove all entries from a queue.
      • deleteTask

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

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

        public java.lang.Double getMaximumDeadline(boolean isOfflineRequest)