Class CloudTasksUtils

  • All Implemented Interfaces:
    java.io.Serializable

    public class CloudTasksUtils
    extends java.lang.Object
    implements java.io.Serializable
    Utilities for dealing with Cloud Tasks.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.cloud.tasks.v2.Task createGetTask​(java.lang.String path, java.lang.String service, com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params)  
      com.google.cloud.tasks.v2.Task createGetTaskWithDelay​(java.lang.String path, java.lang.String service, com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params, org.joda.time.Duration delay)
      Create a Task via HTTP.GET that will be delayed for delay.
      com.google.cloud.tasks.v2.Task createGetTaskWithJitter​(java.lang.String path, java.lang.String service, com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params, java.util.Optional<java.lang.Integer> jitterSeconds)
      Create a Task via HTTP.GET that will be randomly delayed up to jitterSeconds.
      com.google.cloud.tasks.v2.Task createPostTask​(java.lang.String path, java.lang.String service, com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params)  
      com.google.cloud.tasks.v2.Task createPostTaskWithDelay​(java.lang.String path, java.lang.String service, com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params, org.joda.time.Duration delay)
      Create a Task via HTTP.POST that will be delayed for delay.
      com.google.cloud.tasks.v2.Task createPostTaskWithJitter​(java.lang.String path, java.lang.String service, com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params, java.util.Optional<java.lang.Integer> jitterSeconds)
      Create a Task via HTTP.POST that will be randomly delayed up to jitterSeconds.
      com.google.cloud.tasks.v2.Task enqueue​(java.lang.String queue, com.google.cloud.tasks.v2.Task task)  
      com.google.common.collect.ImmutableList<com.google.cloud.tasks.v2.Task> enqueue​(java.lang.String queue, com.google.cloud.tasks.v2.Task... tasks)  
      com.google.common.collect.ImmutableList<com.google.cloud.tasks.v2.Task> enqueue​(java.lang.String queue, java.lang.Iterable<com.google.cloud.tasks.v2.Task> tasks)  
      • Methods inherited from class java.lang.Object

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

      • enqueue

        public com.google.cloud.tasks.v2.Task enqueue​(java.lang.String queue,
                                                      com.google.cloud.tasks.v2.Task task)
      • enqueue

        public com.google.common.collect.ImmutableList<com.google.cloud.tasks.v2.Task> enqueue​(java.lang.String queue,
                                                                                               java.lang.Iterable<com.google.cloud.tasks.v2.Task> tasks)
      • enqueue

        public com.google.common.collect.ImmutableList<com.google.cloud.tasks.v2.Task> enqueue​(java.lang.String queue,
                                                                                               com.google.cloud.tasks.v2.Task... tasks)
      • createPostTask

        public com.google.cloud.tasks.v2.Task createPostTask​(java.lang.String path,
                                                             java.lang.String service,
                                                             com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params)
      • createGetTask

        public com.google.cloud.tasks.v2.Task createGetTask​(java.lang.String path,
                                                            java.lang.String service,
                                                            com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params)
      • createPostTaskWithJitter

        public com.google.cloud.tasks.v2.Task createPostTaskWithJitter​(java.lang.String path,
                                                                       java.lang.String service,
                                                                       com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params,
                                                                       java.util.Optional<java.lang.Integer> jitterSeconds)
        Create a Task via HTTP.POST that will be randomly delayed up to jitterSeconds.
      • createGetTaskWithJitter

        public com.google.cloud.tasks.v2.Task createGetTaskWithJitter​(java.lang.String path,
                                                                      java.lang.String service,
                                                                      com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params,
                                                                      java.util.Optional<java.lang.Integer> jitterSeconds)
        Create a Task via HTTP.GET that will be randomly delayed up to jitterSeconds.
      • createPostTaskWithDelay

        public com.google.cloud.tasks.v2.Task createPostTaskWithDelay​(java.lang.String path,
                                                                      java.lang.String service,
                                                                      com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params,
                                                                      org.joda.time.Duration delay)
        Create a Task via HTTP.POST that will be delayed for delay.
      • createGetTaskWithDelay

        public com.google.cloud.tasks.v2.Task createGetTaskWithDelay​(java.lang.String path,
                                                                     java.lang.String service,
                                                                     com.google.common.collect.Multimap<java.lang.String,​java.lang.String> params,
                                                                     org.joda.time.Duration delay)
        Create a Task via HTTP.GET that will be delayed for delay.