com.amazonaws.services.simpleworkflow.flow

## インタフェース WorkerBase

- すべてのスーパーインタフェース:
    Suspendable, SuspendableWorker, WorkerLifecycle
  既知の実装クラスのリスト:
    ActivityWorker, GenericActivityWorker, GenericWorker, GenericWorkflowWorker, SpringActivityWorker, SpringWorkflowWorker, WorkflowWorker

      public interface WorkerBase
      extends SuspendableWorker

- - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `java.lang.String` | `getDomain()`
    `long` | `getDomainRetentionPeriodInDays()`
    `java.lang.String` | `getIdentity()`
    `int` | `getMaximumPollRateIntervalMilliseconds()`
    `double` | `getMaximumPollRatePerSecond()`
    `double` | `getPollBackoffCoefficient()`
    `long` | `getPollBackoffInitialInterval()`
    `long` | `getPollBackoffMaximumInterval()`
    `int` | `getPollThreadCount()`
    `AmazonSimpleWorkflow` | `getService()`
    `java.lang.String` | `getTaskListToPoll()` Task list name that given worker polls for tasks.
    `java.lang.Thread.UncaughtExceptionHandler` | `getUncaughtExceptionHandler()`
    `boolean` | `isDisableServiceShutdownOnStop()`
    `boolean` | `isDisableTypeRegistrationOnStart()`
    `boolean` | `isRegisterDomain()`
    `boolean` | `isRunning()`
    `void` | `registerTypesToPoll()` Try to register every type (activity or workflow depending on worker) that are configured with the worker.
    `void` | `setDisableServiceShutdownOnStop(boolean disableServiceShutdownOnStop)` When set to false (which is default) at the beginning of the worker shutdown `AmazonSimpleWorkflow.shutdown()` is called.
    `void` | `setDisableTypeRegistrationOnStart(boolean disableTypeRegistrationOnStart)` When set to true disables types registration on start even if `SkipTypeRegistration` is not specified.
    `void` | `setDomainRetentionPeriodInDays(long domainRetentionPeriodInDays)` Value of DomainRetentionPeriodInDays parameter passed to `AmazonSimpleWorkflow.registerDomain(com.amazonaws.services.simpleworkflow.model.RegisterDomainRequest)` call.
    `void` | `setIdentity(java.lang.String identity)` Set the identity that worker specifies in the poll requests.
    `void` | `setMaximumPollRateIntervalMilliseconds(int maximumPollRateIntervalMilliseconds)` The sliding window interval used to measure the poll rate.
    `void` | `setMaximumPollRatePerSecond(double maximumPollRatePerSecond)` Maximum number of poll request to the task list per second allowed.
    `void` | `setPollBackoffCoefficient(double backoffCoefficient)`
    `void` | `setPollBackoffInitialInterval(long backoffInitialInterval)` Failed poll requests are retried after an interval defined by an exponential backoff algorithm.
    `void` | `setPollBackoffMaximumInterval(long backoffMaximumInterval)`
    `void` | `setPollThreadCount(int threadCount)` Defines how many concurrent threads are used by the given worker to poll the specified task list.
    `void` | `setRegisterDomain(boolean registerDomain)` Should domain be registered on startup.
    `void` | `setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)` Handler notified about poll request and other unexpected failures.

    - ### インタフェースから継承されたメソッド com.amazonaws.services.simpleworkflow.flow.Suspendable

      `resumePolling, suspendPolling`

    - ### インタフェースから継承されたメソッド com.amazonaws.services.simpleworkflow.flow.WorkerLifecycle

      `awaitTermination, shutdown, shutdownAndAwaitTermination, shutdownNow, start`

- - ### メソッドの詳細

    - #### getService

          AmazonSimpleWorkflow getService()

    - #### getDomain

          java.lang.String getDomain()

    - #### isRegisterDomain

          boolean isRegisterDomain()

    - #### setRegisterDomain

          void setRegisterDomain(boolean registerDomain)

      Should domain be registered on startup. Default is `false`. When enabled `#setDomainRetentionPeriodInDays(Long)` property is required.

    - #### getDomainRetentionPeriodInDays

          long getDomainRetentionPeriodInDays()

    - #### setDomainRetentionPeriodInDays

          void setDomainRetentionPeriodInDays(long domainRetentionPeriodInDays)

      Value of DomainRetentionPeriodInDays parameter passed to `AmazonSimpleWorkflow.registerDomain(com.amazonaws.services.simpleworkflow.model.RegisterDomainRequest)` call. Required when `isRegisterDomain()` is `true`.

    - #### getTaskListToPoll

          java.lang.String getTaskListToPoll()

      Task list name that given worker polls for tasks.

    - #### getMaximumPollRatePerSecond

          double getMaximumPollRatePerSecond()

    - #### setMaximumPollRatePerSecond

          void setMaximumPollRatePerSecond(double maximumPollRatePerSecond)

      Maximum number of poll request to the task list per second allowed. Default is 0 which means unlimited.
      関連項目:
        `setMaximumPollRateIntervalMilliseconds(int)`

    - #### getMaximumPollRateIntervalMilliseconds

          int getMaximumPollRateIntervalMilliseconds()

    - #### setMaximumPollRateIntervalMilliseconds

          void setMaximumPollRateIntervalMilliseconds(int maximumPollRateIntervalMilliseconds)

      The sliding window interval used to measure the poll rate. Controls allowed rate burstiness. For example if allowed rate is 10 per second and poll rate interval is 100 milliseconds the poller is not going to allow more then one poll per 100 milliseconds. If poll rate interval is 10 seconds then 100 request can be emitted as fast as possible, but then the polling stops until 10 seconds pass.
      関連項目:
        `setMaximumPollRatePerSecond(double)`

    - #### getUncaughtExceptionHandler

          java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()

    - #### setUncaughtExceptionHandler

          void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)

      Handler notified about poll request and other unexpected failures. The default implementation logs the failures using ERROR level.

    - #### getIdentity

          java.lang.String getIdentity()

    - #### setIdentity

          void setIdentity(java.lang.String identity)

      Set the identity that worker specifies in the poll requests. This value ends up stored in the identity field of the corresponding Start history event. Default is "pid"@"host".
      パラメータ:
        `identity` - maximum size is 256 characters.

    - #### getPollBackoffInitialInterval

          long getPollBackoffInitialInterval()

    - #### setPollBackoffInitialInterval

          void setPollBackoffInitialInterval(long backoffInitialInterval)

      Failed poll requests are retried after an interval defined by an exponential backoff algorithm. See BackoffThrottler for more info.
      パラメータ:
        `backoffInitialInterval` - the interval between failure and the first retry. Default is 100.

    - #### getPollBackoffMaximumInterval

          long getPollBackoffMaximumInterval()

    - #### setPollBackoffMaximumInterval

          void setPollBackoffMaximumInterval(long backoffMaximumInterval)

      パラメータ:
        `backoffMaximumInterval` - maximum interval between poll request retries. Default is 60000 (one minute).
      関連項目:
        `setPollBackoffInitialInterval(long)`

    - #### getPollBackoffCoefficient

          double getPollBackoffCoefficient()

    - #### setPollBackoffCoefficient

          void setPollBackoffCoefficient(double backoffCoefficient)

      パラメータ:
        `backoffCoefficient` - coefficient that defines how fast retry interval grows in case of poll request failures. Default is 2.0.
      関連項目:
        `setPollBackoffInitialInterval(long)`

    - #### isDisableServiceShutdownOnStop

          boolean isDisableServiceShutdownOnStop()

    - #### setDisableServiceShutdownOnStop

          void setDisableServiceShutdownOnStop(boolean disableServiceShutdownOnStop)

      When set to false (which is default) at the beginning of the worker shutdown `AmazonSimpleWorkflow.shutdown()` is called. It causes all outstanding long poll request to disconnect. But also causes all future request (for example activity completions) to SWF fail.

    - #### getPollThreadCount

          int getPollThreadCount()

    - #### setPollThreadCount

          void setPollThreadCount(int threadCount)

      Defines how many concurrent threads are used by the given worker to poll the specified task list. Default is 1. Note that in case of `ActivityWorker` two separate threads pools are used. One for polling and another one for executing activities. The size of the activity execution thread pool is defined through `ActivityWorker.setTaskExecutorThreadPoolSize(int)`.

    - #### registerTypesToPoll

          void registerTypesToPoll()

      Try to register every type (activity or workflow depending on worker) that are configured with the worker.
      関連項目:
        `setDisableTypeRegistrationOnStart(boolean)`

    - #### isRunning

          boolean isRunning()

    - #### setDisableTypeRegistrationOnStart

          void setDisableTypeRegistrationOnStart(boolean disableTypeRegistrationOnStart)

      When set to true disables types registration on start even if `SkipTypeRegistration` is not specified. Types still can be registered by calling `registerTypesToPoll()`.

    - #### isDisableTypeRegistrationOnStart

          boolean isDisableTypeRegistrationOnStart()