Class ExecutorParams

java.lang.Object
org.redisson.api.options.ExecutorParams
All Implemented Interfaces:
CodecOptions<ExecutorOptions,Codec>, ExecutorOptions, InvocationOptions<ExecutorOptions>, ObjectParams

public final class ExecutorParams extends Object implements ExecutorOptions
Author:
Nikita Koksharov
  • Method Details

    • taskRetryInterval

      public ExecutorOptions taskRetryInterval(Duration interval)
      Description copied from interface: ExecutorOptions
      Defines task retry interval at the end of which task is executed again by ExecutorService worker.

      Counted from the task start moment. Applied only if the task was in progress but for some reason wasn't marked as completed (successful or unsuccessful).

      Set 0 to disable.

      Default is 5 minutes

      Specified by:
      taskRetryInterval in interface ExecutorOptions
      Parameters:
      interval - value
      Returns:
      options instance
    • idGenerator

      public ExecutorOptions idGenerator(IdGenerator idGenerator)
      Description copied from interface: ExecutorOptions
      Defines identifier generator
      Specified by:
      idGenerator in interface ExecutorOptions
      Parameters:
      idGenerator - identifier generator
      Returns:
      options instance
    • getName

      public String getName()
    • getTaskRetryInterval

      public int getTaskRetryInterval()
    • getIdGenerator

      public IdGenerator getIdGenerator()
    • codec

      public ExecutorOptions codec(Codec codec)
      Description copied from interface: CodecOptions
      Defines codec used for data stored in Redis
      Specified by:
      codec in interface CodecOptions<T extends InvocationOptions<T>,C>
      Parameters:
      codec - applied to object instance
      Returns:
      options object
    • timeout

      public ExecutorOptions timeout(Duration timeout)
      Description copied from interface: InvocationOptions
      Defines Redis server response timeout. Starts to countdown when a Redis command was successfully sent.

      Default is the value specified for the same parameter in Redisson configuration

      Specified by:
      timeout in interface InvocationOptions<T extends InvocationOptions<T>>
      Parameters:
      timeout - Redis server response timeout
      Returns:
      options instance
    • retryAttempts

      public ExecutorOptions retryAttempts(int retryAttempts)
      Description copied from interface: InvocationOptions
      Defines command retry attempts. Error is thrown if the Redis command can't be sent to Redis server after retryAttempts. But if it sent successfully then responseTimeout is started.

      Default is the value specified for the same parameter in Redisson configuration

      Specified by:
      retryAttempts in interface InvocationOptions<T extends InvocationOptions<T>>
      Parameters:
      retryAttempts - command retry attempts
      Returns:
      options instance
    • retryInterval

      public ExecutorOptions retryInterval(Duration interval)
      Description copied from interface: InvocationOptions
      Defines time interval for another one attempt to send a Redis command if it hasn't already been sent.
      Specified by:
      retryInterval in interface InvocationOptions<T extends InvocationOptions<T>>
      Parameters:
      interval - retry time interval
      Returns:
      options instance
    • getTimeout

      public int getTimeout()
      Specified by:
      getTimeout in interface ObjectParams
    • getRetryAttempts

      public int getRetryAttempts()
      Specified by:
      getRetryAttempts in interface ObjectParams
    • getRetryInterval

      public int getRetryInterval()
      Specified by:
      getRetryInterval in interface ObjectParams
    • getCodec

      public Codec getCodec()