Class DnsQueue

    • Constructor Summary

      Constructors 
      Constructor Description
      DnsQueue​(com.google.appengine.api.taskqueue.Queue queue, Clock clock)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.appengine.api.taskqueue.TaskHandle addDomainRefreshTask​(java.lang.String domainName)
      Enqueues a task to refresh DNS for the specified domain now.
      com.google.appengine.api.taskqueue.TaskHandle addDomainRefreshTask​(java.lang.String domainName, org.joda.time.Duration countdown)
      Enqueues a task to refresh DNS for the specified domain at some point in the future.
      com.google.appengine.api.taskqueue.TaskHandle addHostRefreshTask​(java.lang.String hostName)
      Adds a task to the queue to refresh the DNS information for the specified subordinate host.
      com.google.appengine.api.taskqueue.TaskHandle addZoneRefreshTask​(java.lang.String zoneName)
      Adds a task to the queue to refresh the DNS information for the specified zone.
      static DnsQueue createForTesting​(Clock clock)  
      void deleteTasks​(java.util.List<com.google.appengine.api.taskqueue.TaskHandle> tasks)
      Delete a list of tasks, removing them from the queue permanently.
      long getLeaseTasksBatchSize()
      Returns the maximum number of tasks that can be leased with leaseTasks(org.joda.time.Duration).
      java.util.List<com.google.appengine.api.taskqueue.TaskHandle> leaseTasks​(org.joda.time.Duration leaseDuration)
      Returns handles for a batch of tasks, leased for the specified duration.
      • Methods inherited from class java.lang.Object

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

      • DnsQueue

        @Inject
        public DnsQueue​(@Named("dns-pull")
                        com.google.appengine.api.taskqueue.Queue queue,
                        Clock clock)
    • Method Detail

      • createForTesting

        public static DnsQueue createForTesting​(Clock clock)
      • addHostRefreshTask

        public com.google.appengine.api.taskqueue.TaskHandle addHostRefreshTask​(java.lang.String hostName)
        Adds a task to the queue to refresh the DNS information for the specified subordinate host.
      • addDomainRefreshTask

        public com.google.appengine.api.taskqueue.TaskHandle addDomainRefreshTask​(java.lang.String domainName)
        Enqueues a task to refresh DNS for the specified domain now.
      • addDomainRefreshTask

        public com.google.appengine.api.taskqueue.TaskHandle addDomainRefreshTask​(java.lang.String domainName,
                                                                                  org.joda.time.Duration countdown)
        Enqueues a task to refresh DNS for the specified domain at some point in the future.
      • addZoneRefreshTask

        public com.google.appengine.api.taskqueue.TaskHandle addZoneRefreshTask​(java.lang.String zoneName)
        Adds a task to the queue to refresh the DNS information for the specified zone.
      • getLeaseTasksBatchSize

        public long getLeaseTasksBatchSize()
        Returns the maximum number of tasks that can be leased with leaseTasks(org.joda.time.Duration).

        If this many tasks are returned, then there might be more tasks still waiting in the queue.

        If less than this number of tasks are returned, then there are no more items in the queue.

      • leaseTasks

        public java.util.List<com.google.appengine.api.taskqueue.TaskHandle> leaseTasks​(org.joda.time.Duration leaseDuration)
        Returns handles for a batch of tasks, leased for the specified duration.
      • deleteTasks

        public void deleteTasks​(java.util.List<com.google.appengine.api.taskqueue.TaskHandle> tasks)
        Delete a list of tasks, removing them from the queue permanently.