Class AsyncTaskEnqueuer


  • public final class AsyncTaskEnqueuer
    extends java.lang.Object
    Helper class to enqueue tasks for handling asynchronous operations in flows.
    • Field Detail

      • PARAM_RESOURCE_KEY

        public static final java.lang.String PARAM_RESOURCE_KEY
        The HTTP parameter names used by async flows.
        See Also:
        Constant Field Values
      • PARAM_REQUESTING_CLIENT_ID

        public static final java.lang.String PARAM_REQUESTING_CLIENT_ID
        See Also:
        Constant Field Values
      • PARAM_CLIENT_TRANSACTION_ID

        public static final java.lang.String PARAM_CLIENT_TRANSACTION_ID
        See Also:
        Constant Field Values
      • PARAM_SERVER_TRANSACTION_ID

        public static final java.lang.String PARAM_SERVER_TRANSACTION_ID
        See Also:
        Constant Field Values
      • PARAM_IS_SUPERUSER

        public static final java.lang.String PARAM_IS_SUPERUSER
        See Also:
        Constant Field Values
      • PARAM_REQUESTED_TIME

        public static final java.lang.String PARAM_REQUESTED_TIME
        See Also:
        Constant Field Values
      • PARAM_RESAVE_TIMES

        public static final java.lang.String PARAM_RESAVE_TIMES
        See Also:
        Constant Field Values
      • QUEUE_ASYNC_ACTIONS

        public static final java.lang.String QUEUE_ASYNC_ACTIONS
        The task queue names used by async flows.
        See Also:
        Constant Field Values
      • QUEUE_ASYNC_DELETE

        public static final java.lang.String QUEUE_ASYNC_DELETE
        See Also:
        Constant Field Values
      • QUEUE_ASYNC_HOST_RENAME

        public static final java.lang.String QUEUE_ASYNC_HOST_RENAME
        See Also:
        Constant Field Values
    • Constructor Detail

      • AsyncTaskEnqueuer

        @Inject
        public AsyncTaskEnqueuer​(@Named("async-delete-pull")
                                 com.google.appengine.api.taskqueue.Queue asyncDeletePullQueue,
                                 @Named("async-host-rename-pull")
                                 com.google.appengine.api.taskqueue.Queue asyncDnsRefreshPullQueue,
                                 @Config("asyncDeleteFlowMapreduceDelay")
                                 org.joda.time.Duration asyncDeleteDelay,
                                 CloudTasksUtils cloudTasksUtils,
                                 Retrier retrier)
    • Method Detail

      • enqueueAsyncResave

        public void enqueueAsyncResave​(VKey<?> entityToResave,
                                       org.joda.time.DateTime now,
                                       org.joda.time.DateTime whenToResave)
        Enqueues a task to asynchronously re-save an entity at some point in the future.
      • enqueueAsyncResave

        public void enqueueAsyncResave​(VKey<?> entityKey,
                                       org.joda.time.DateTime now,
                                       com.google.common.collect.ImmutableSortedSet<org.joda.time.DateTime> whenToResave)
        Enqueues a task to asynchronously re-save an entity at some point(s) in the future.

        Multiple re-save times are chained one after the other, i.e. any given run will re-enqueue itself to run at the next time if there are remaining re-saves scheduled.

      • enqueueAsyncDelete

        public void enqueueAsyncDelete​(EppResource resourceToDelete,
                                       org.joda.time.DateTime now,
                                       java.lang.String requestingRegistrarId,
                                       Trid trid,
                                       boolean isSuperuser)
        Enqueues a task to asynchronously delete a contact or host, by key.
      • enqueueAsyncDnsRefresh

        public void enqueueAsyncDnsRefresh​(HostResource host,
                                           org.joda.time.DateTime now)
        Enqueues a task to asynchronously refresh DNS for a renamed host.