Liking cljdoc? Tell your friends :D

systems.thoughtfull.amalgam.executors


->ExecutorServiceComponentclj

(->ExecutorServiceComponent make-executor-service-fn
                            convey-bindings?
                            termination-wait-duration)

Positional factory function for class systems.thoughtfull.amalgam.executors.ExecutorServiceComponent.

An executor service that is also a component. It can be injected as a dependency of other components but also implements the ExecutorService interface.

  • make-executor-service-fn — a function that takes the ExecutorServiceComponent as an argument and creates an ExecutorService for wrapping. Any options necessary for constructing an ExecutorService should be taken from the ExecutorServiceComponent.
  • convey-bindings? — if true then convey thread local var bindings with tasks as they are submitted to the wrapped ExecutorService, defaults to true.
  • termination-wait-duration — a java.time.Duration to wait for the ExecutorService to terminate when this component is stopped. A duration of zero means don't wait at all. If not specified, then wait indefinitely.
Positional factory function for class systems.thoughtfull.amalgam.executors.ExecutorServiceComponent.

An executor service that is also a component.  It can be injected as a dependency of other
components but also implements the ExecutorService interface.

- **`make-executor-service-fn`** — a function that takes the ExecutorServiceComponent as an
  argument and creates an ExecutorService for wrapping.  Any options necessary for constructing an
  ExecutorService should be taken from the ExecutorServiceComponent.
- **`convey-bindings?`** — if true then convey thread local var bindings with tasks as they are
  submitted to the wrapped ExecutorService, defaults to true.
- **`termination-wait-duration`** — a *java.time.Duration* to wait for the ExecutorService to
  terminate when this component is stopped.  A duration of zero means don't wait at all.  If not
  specified, then wait indefinitely.
sourceraw docstring

->ScheduledExecutorServiceComponentclj

(->ScheduledExecutorServiceComponent make-executor-service-fn
                                     convey-bindings?
                                     termination-wait-duration)

Positional factory function for class systems.thoughtfull.amalgam.executors.ScheduledExecutorServiceComponent.

An scheduled executor service that is also a component. It can be injected as a dependency of other components but also implements the ScheduledExecutorService interface.

  • make-executor-service-fn — a function that takes the ScheduledExecutorServiceComponent as an argument and creates a ScheduledExecutorService for wrapping. Any options necessary for constructing an ScheduledExecutorService should be taken from the ScheduledExecutorServiceComponent.
  • convey-bindings? — if true then convey thread local var bindings with tasks as they are submitted to the wrapped ExecutorService.
  • termination-wait-duration — a java.time.Duration to wait for the ScheduledExecutorService to terminate when this component is stopped. A duration of zero means don't wait at all. If not specified, then wait indefinitely.
Positional factory function for class systems.thoughtfull.amalgam.executors.ScheduledExecutorServiceComponent.

An scheduled executor service that is also a component.  It can be injected as a dependency of
other components but also implements the ScheduledExecutorService interface.

- **`make-executor-service-fn`** — a function that takes the ScheduledExecutorServiceComponent as
  an argument and creates a ScheduledExecutorService for wrapping.  Any options necessary for
  constructing an ScheduledExecutorService should be taken from the
  ScheduledExecutorServiceComponent.
- **`convey-bindings?`** — if true then convey thread local var bindings with tasks as they are
  submitted to the wrapped ExecutorService.
- **`termination-wait-duration`** — a *java.time.Duration* to wait for the
  ScheduledExecutorService to terminate when this component is stopped.  A duration of zero means
  don't wait at all.  If not specified, then wait indefinitely.
sourceraw docstring

->ScheduledTaskComponentclj

(->ScheduledTaskComponent executor-service make-scheduled-future-fn)

Positional factory function for class systems.thoughtfull.amalgam.executors.ScheduledTaskComponent.

A scheduled task that is also a component.

  • executor-service — ScheduledExecutorService to use to schedule task. If not specified then a single thread scheduled-thread-pool component is started when this component is started and stopped when this component is stopped.
  • make-scheduled-future-fn — a function that takes the ScheduledTaskComponent as an argument and creates a ScheduledFuture for wrapping. Any options necessary for constructing a ScheduledFuture should be taken from the ScheduledTaskComponent.
Positional factory function for class systems.thoughtfull.amalgam.executors.ScheduledTaskComponent.

A scheduled task that is also a component.

- **`executor-service`** — ScheduledExecutorService to use to schedule task.  If not specified
  then a single thread `scheduled-thread-pool` component is started when this component is started
  and stopped when this component is stopped.
- **`make-scheduled-future-fn`** — a function that takes the ScheduledTaskComponent as an argument
  and creates a ScheduledFuture for wrapping.  Any options necessary for constructing a
  ScheduledFuture should be taken from the ScheduledTaskComponent.
sourceraw docstring

conveying-callableclj

(conveying-callable task)
source

conveying-runnableclj

(conveying-runnable task)
source

executor-serviceclj

(executor-service {:keys [executor-service]})

Return wrapped ExecutorService from ExecutorServiceComponent. Throws IllegalStateException if the component is not started (i.e. it does not have an ExecutorService).

Return wrapped ExecutorService from ExecutorServiceComponent.  Throws IllegalStateException if
the component is not started (i.e. it does not have an ExecutorService).
sourceraw docstring

fixed-delay-scheduled-taskclj

(fixed-delay-scheduled-task task
                            delay-duration
                            &
                            {:as opts
                             :keys [initial-delay-duration executor-service]})

Make a new fixed delay ScheduledTaskComponent wrapping a ScheduledFuture.

  • task — a one argument function to run as a scheduled task. It takes as an argument the task component and its dependencies.
  • delay-durationjava.time.Duration from the end of one run to the start of the next
  • initial-delay-durationjava.time.Duration to wait before the first run of task, defaults to 0
  • executor-service — ScheduledExecutorService to use to schedule task. If not specified then a single thread scheduled-thread-pool component is started when this component is started and stopped when this component is stopped.

See java.util.concurrent.ScheduledThreadPoolExecutor

Make a new fixed delay ScheduledTaskComponent wrapping a ScheduledFuture.

- **`task`** — a one argument function to run as a scheduled task.  It takes as an argument the
  task component and its dependencies.
- **`delay-duration`** — *java.time.Duration* from the end of one run to the start of the next
- **`initial-delay-duration`** — *java.time.Duration* to wait before the first run of `task`,
  defaults to 0
- **`executor-service`** — ScheduledExecutorService to use to schedule task.  If not specified
  then a single thread `scheduled-thread-pool` component is started when this component is started
  and stopped when this component is stopped.

See *java.util.concurrent.ScheduledThreadPoolExecutor*
sourceraw docstring

fixed-rate-scheduled-taskclj

(fixed-rate-scheduled-task task
                           period-duration
                           &
                           {:as opts
                            :keys [initial-delay-duration executor-service]})

Make a new fixed rate ScheduledTaskComponent wrapping a ScheduledFuture.

  • task — a one argument function to run as a scheduled task. It takes as an argument the task component and its dependencies.
  • period-durationjava.time.Duration from the start of one run to the start of the next
  • initial-delay-durationjava.time.Duration to wait before the first run of task, defaults to 0
  • executor-service — ScheduledExecutorService to use to schedule task. If not specified then a single thread scheduled-thread-pool component is started when this component is started and stopped when this component is stopped.

See java.util.concurrent.ScheduledThreadPoolExecutor

Make a new fixed rate ScheduledTaskComponent wrapping a ScheduledFuture.

- **`task`** — a one argument function to run as a scheduled task.  It takes as an argument the
  task component and its dependencies.
- **`period-duration`** — *java.time.Duration* from the start of one run to the start of the next
- **`initial-delay-duration`** — *java.time.Duration* to wait before the first run of `task`,
  defaults to 0
- **`executor-service`** — ScheduledExecutorService to use to schedule task.  If not specified
  then a single thread `scheduled-thread-pool` component is started when this component is started
  and stopped when this component is stopped.

See *java.util.concurrent.ScheduledThreadPoolExecutor*
sourceraw docstring

make-fixed-delay-scheduled-taskclj

(make-fixed-delay-scheduled-task
  executor-service
  {:as component :keys [task initial-delay-duration delay-duration]})

Make a ScheduledFuture for wrapping by ScheduledTaskComponent.

  • executor-service — ScheduledExecutorService to use to schedule task. If not specified then a single thread scheduled-thread-pool component is started when this component is started and stopped when this component is stopped.
  • task — a one argument function to run as a scheduled task. It takes as an argument the task component and its dependencies.
  • initial-delay-durationjava.time.Duration to wait before the first run of task
  • delay-durationjava.time.Duration from the end of one run to the start of the next

See java.util.concurrent.ScheduledThreadPoolExecutor

Make a ScheduledFuture for wrapping by ScheduledTaskComponent.

- **`executor-service`** — ScheduledExecutorService to use to schedule task.  If not specified
  then a single thread `scheduled-thread-pool` component is started when this component is started
  and stopped when this component is stopped.
- **`task`** — a one argument function to run as a scheduled task.  It takes as an argument the
  task component and its dependencies.
- **`initial-delay-duration`** — *java.time.Duration* to wait before the first run of `task`
- **`delay-duration`** — *java.time.Duration* from the end of one run to the start of the next

See *java.util.concurrent.ScheduledThreadPoolExecutor*
sourceraw docstring

make-fixed-rate-scheduled-taskclj

(make-fixed-rate-scheduled-task
  executor-service
  {:as component :keys [task initial-delay-duration period-duration]})

Make a ScheduledFuture for wrapping by ScheduledTaskComponent.

  • executor-service — ScheduledExecutorService to use to schedule task. If not specified then a single thread scheduled-thread-pool component is started when this component is started and stopped when this component is stopped.
  • task — a one argument function to run as a scheduled task. It takes as an argument the task componentand its dependencies.
  • initial-delay-durationjava.time.Duration to wait before the first run of task
  • period-durationjava.time.Duration from the start of one run to the start of the next

See java.util.concurrent.ScheduledThreadPoolExecutor

Make a ScheduledFuture for wrapping by ScheduledTaskComponent.

- **`executor-service`** — ScheduledExecutorService to use to schedule task.  If not specified
  then a single thread `scheduled-thread-pool` component is started when this component is started
  and stopped when this component is stopped.
- **`task`** — a one argument function to run as a scheduled task.  It takes as an argument the
  task componentand its dependencies.
- **`initial-delay-duration`** — *java.time.Duration* to wait before the first run of `task`
- **`period-duration`** — *java.time.Duration* from the start of one run to the start of the next

See *java.util.concurrent.ScheduledThreadPoolExecutor*
sourceraw docstring

make-scheduled-thread-poolclj

(make-scheduled-thread-pool {:keys [core-pool-size thread-factory
                                    rejected-execution-handler]})

Make a ScheduledThreadPoolExecutor for wrapping by ScheduledExecutorServiceComponent.

  • core-pool-size — number of threads to keep in the pool, even if they are idle
  • thread-factory — factory to use when executor creates a new thread. Defaults to Executors/defaultThreadFactory.
  • rejected-execution-handler — handler to use when execution is blocked because the thread bound and queue capacities are reached

See java.util.concurrent.ScheduledThreadPoolExecutor

Make a ScheduledThreadPoolExecutor for wrapping by ScheduledExecutorServiceComponent.

- **`core-pool-size`** — number of threads to keep in the pool, even if they are idle
- **`thread-factory`** — factory to use when executor creates a new thread.  Defaults to
  *Executors/defaultThreadFactory*.
- **`rejected-execution-handler`** — handler to use when execution is blocked because the thread
  bound and queue capacities are reached

See *java.util.concurrent.ScheduledThreadPoolExecutor*
sourceraw docstring

make-thread-poolclj

(make-thread-pool {:keys [core-pool-size max-pool-size keep-alive-duration
                          work-queue thread-factory
                          rejected-execution-handler]})

Make a ThreadPoolExecutor for wrapping by ExecutorServiceComponent.

  • core-pool-size — number of threads to keep in the pool, even if they are idle
  • max-pool-size — maximum number of threads to allow in the pool
  • keep-alive-duration — when the number of threads is greater than the core, the maximum java.time.Duration to wait for new tasks before terminating
  • work-queue — queue to use for holding tasks before they are executed
  • thread-factory — factory to use when executor creates a new thread. Defaults to Executors/defaultThreadFactory.
  • rejected-execution-handler — handler to use when execution is blocked because the thread bound and queue capacities are reached

See java.util.concurrent.ThreadPoolExecutor

Make a ThreadPoolExecutor for wrapping by ExecutorServiceComponent.

- **`core-pool-size`** — number of threads to keep in the pool, even if they are idle
- **`max-pool-size`** — maximum number of threads to allow in the pool
- **`keep-alive-duration`** — when the number of threads is greater than the core, the maximum
  *java.time.Duration* to wait for new tasks before terminating
- **`work-queue`** — queue to use for holding tasks before they are executed
- **`thread-factory`** — factory to use when executor creates a new thread.  Defaults to
  *Executors/defaultThreadFactory*.
- **`rejected-execution-handler`** — handler to use when execution is blocked because the thread
  bound and queue capacities are reached

See *java.util.concurrent.ThreadPoolExecutor*
sourceraw docstring

map->ExecutorServiceComponentclj

(map->ExecutorServiceComponent &
                               {:keys [make-executor-service-fn convey-bindings?
                                       termination-wait-duration]})

Factory function for class systems.thoughtfull.amalgam.executors.ExecutorServiceComponent, taking a map of keywords to field values.

An executor service that is also a component. It can be injected as a dependency of other components but also implements the ExecutorService interface.

  • make-executor-service-fn — a function that takes the ExecutorServiceComponent as an argument and creates an ExecutorService for wrapping. Any options necessary for constructing an ExecutorService should be taken from the ExecutorServiceComponent.
  • convey-bindings? — if true then convey thread local var bindings with tasks as they are submitted to the wrapped ExecutorService, defaults to true.
  • termination-wait-duration — a java.time.Duration to wait for the ExecutorService to terminate when this component is stopped. A duration of zero means don't wait at all. If not specified, then wait indefinitely.
Factory function for class systems.thoughtfull.amalgam.executors.ExecutorServiceComponent, taking a map of keywords to field values.

An executor service that is also a component.  It can be injected as a dependency of other
components but also implements the ExecutorService interface.

- **`make-executor-service-fn`** — a function that takes the ExecutorServiceComponent as an
  argument and creates an ExecutorService for wrapping.  Any options necessary for constructing an
  ExecutorService should be taken from the ExecutorServiceComponent.
- **`convey-bindings?`** — if true then convey thread local var bindings with tasks as they are
  submitted to the wrapped ExecutorService, defaults to true.
- **`termination-wait-duration`** — a *java.time.Duration* to wait for the ExecutorService to
  terminate when this component is stopped.  A duration of zero means don't wait at all.  If not
  specified, then wait indefinitely.
sourceraw docstring

map->ScheduledExecutorServiceComponentclj

(map->ScheduledExecutorServiceComponent
  &
  {:keys [make-executor-service-fn convey-bindings? termination-wait-duration]})

Factory function for class systems.thoughtfull.amalgam.executors.ScheduledExecutorServiceComponent, taking a map of keywords to field values.

An scheduled executor service that is also a component. It can be injected as a dependency of other components but also implements the ScheduledExecutorService interface.

  • make-executor-service-fn — a function that takes the ScheduledExecutorServiceComponent as an argument and creates a ScheduledExecutorService for wrapping. Any options necessary for constructing an ScheduledExecutorService should be taken from the ScheduledExecutorServiceComponent.
  • convey-bindings? — if true then convey thread local var bindings with tasks as they are submitted to the wrapped ExecutorService.
  • termination-wait-duration — a java.time.Duration to wait for the ScheduledExecutorService to terminate when this component is stopped. A duration of zero means don't wait at all. If not specified, then wait indefinitely.
Factory function for class systems.thoughtfull.amalgam.executors.ScheduledExecutorServiceComponent, taking a map of keywords to field values.

An scheduled executor service that is also a component.  It can be injected as a dependency of
other components but also implements the ScheduledExecutorService interface.

- **`make-executor-service-fn`** — a function that takes the ScheduledExecutorServiceComponent as
  an argument and creates a ScheduledExecutorService for wrapping.  Any options necessary for
  constructing an ScheduledExecutorService should be taken from the
  ScheduledExecutorServiceComponent.
- **`convey-bindings?`** — if true then convey thread local var bindings with tasks as they are
  submitted to the wrapped ExecutorService.
- **`termination-wait-duration`** — a *java.time.Duration* to wait for the
  ScheduledExecutorService to terminate when this component is stopped.  A duration of zero means
  don't wait at all.  If not specified, then wait indefinitely.
sourceraw docstring

map->ScheduledTaskComponentclj

(map->ScheduledTaskComponent &
                             {:keys [executor-service
                                     make-scheduled-future-fn]})

Factory function for class systems.thoughtfull.amalgam.executors.ScheduledTaskComponent, taking a map of keywords to field values.

A scheduled task that is also a component.

  • executor-service — ScheduledExecutorService to use to schedule task. If not specified then a single thread scheduled-thread-pool component is started when this component is started and stopped when this component is stopped.
  • make-scheduled-future-fn — a function that takes the ScheduledTaskComponent as an argument and creates a ScheduledFuture for wrapping. Any options necessary for constructing a ScheduledFuture should be taken from the ScheduledTaskComponent.
Factory function for class systems.thoughtfull.amalgam.executors.ScheduledTaskComponent, taking a map of keywords to field values.

A scheduled task that is also a component.

- **`executor-service`** — ScheduledExecutorService to use to schedule task.  If not specified
  then a single thread `scheduled-thread-pool` component is started when this component is started
  and stopped when this component is stopped.
- **`make-scheduled-future-fn`** — a function that takes the ScheduledTaskComponent as an argument
  and creates a ScheduledFuture for wrapping.  Any options necessary for constructing a
  ScheduledFuture should be taken from the ScheduledTaskComponent.
sourceraw docstring

scheduled-executor-serviceclj

(scheduled-executor-service {:keys [executor-service]})

Return wrapped ScheduledExecutorService from ScheduledExecutorServiceComponent. Throws IllegalStateException if the component is not started (i.e. it does not have an ScheduledExecutorService).

Return wrapped ScheduledExecutorService from ScheduledExecutorServiceComponent.  Throws
IllegalStateException if the component is not started (i.e. it does not have an
ScheduledExecutorService).
sourceraw docstring

scheduled-futureclj

(scheduled-future {:keys [scheduled-future]})

Return wrapped ScheduledFuture from ScheduledTaskComponent. Throws IllegalStateException if the component is not started (i.e. it does not have an ScheduledFuture).

Return wrapped ScheduledFuture from ScheduledTaskComponent.  Throws IllegalStateException if the
component is not started (i.e. it does not have an ScheduledFuture).
sourceraw docstring

scheduled-thread-poolclj

(scheduled-thread-pool core-pool-size
                       &
                       {:as opts
                        :keys [thread-factory rejected-execution-handler
                               convey-bindings? termination-wait-duration]})

Make a new ScheduledExecutorServiceComponent wrapping a ScheduledThreadPoolExecutor.

  • core-pool-size — number of threads to keep in the pool, even if they are idle
  • thread-factory — factory to use when executor creates a new thread. Defaults to Executors/defaultThreadFactory.
  • convey-bindings? — if true then convey thread local var bindings with tasks as they are submitted to the wrapped ScheduledExecutorService.
  • rejected-execution-handler — handler to use when execution is blocked because the thread bound and queue capacities are reached
  • termination-wait-duration — a java.time.Duration to wait for the ScheduledExecutorService to terminate when the component is stopped. A duration of zero means don't wait at all. If not specified, then wait indefinitely.
Make a new ScheduledExecutorServiceComponent wrapping a ScheduledThreadPoolExecutor.

- **`core-pool-size`** — number of threads to keep in the pool, even if they are idle
- **`thread-factory`** — factory to use when executor creates a new thread.  Defaults to
  *Executors/defaultThreadFactory*.
- **`convey-bindings?`** — if true then convey thread local var bindings with tasks as they are
  submitted to the wrapped ScheduledExecutorService.
- **`rejected-execution-handler`** — handler to use when execution is blocked because the thread
  bound and queue capacities are reached
- **`termination-wait-duration`** — a *java.time.Duration* to wait for the
  ScheduledExecutorService to terminate when the component is stopped.  A duration of zero means
  don't wait at all.  If not specified, then wait indefinitely.
sourceraw docstring

thread-poolclj

(thread-pool core-pool-size
             max-pool-size
             keep-alive-duration
             work-queue
             &
             {:as opts
              :keys [thread-factory rejected-execution-handler convey-bindings?
                     termination-wait-duration]})

Make a new ExecutorServiceComponent wrapping a ThreadPoolExecutor.

  • core-pool-size — number of threads to keep in the pool, even if they are idle
  • max-pool-size — maximum number of threads to allow in the pool
  • keep-alive-duration — when the number of threads is greater than the core, the maximum java.time.Duration to wait for new tasks before terminating
  • work-queue — queue to use for holding tasks before they are executed
  • thread-factory — factory to use when executor creates a new thread.
  • convey-bindings? — if true then convey thread local var bindings with tasks as they are submitted to the wrapped ExecutorService.
  • rejected-execution-handler — handler to use when execution is blocked because the thread bound and queue capacities are reached
  • termination-wait-duration — a java.time.Duration to wait for the ExecutorService to terminate when the component is stopped. A duration of zero means don't wait at all. If not specified, then wait indefinitely.
Make a new ExecutorServiceComponent wrapping a ThreadPoolExecutor.

- **`core-pool-size`** — number of threads to keep in the pool, even if they are idle
- **`max-pool-size`** — maximum number of threads to allow in the pool
- **`keep-alive-duration`** — when the number of threads is greater than the core, the maximum
  *java.time.Duration* to wait for new tasks before terminating
- **`work-queue`** — queue to use for holding tasks before they are executed
- **`thread-factory`** — factory to use when executor creates a new thread.
- **`convey-bindings?`** — if true then convey thread local var bindings with tasks as they are
  submitted to the wrapped ExecutorService.
- **`rejected-execution-handler`** — handler to use when execution is blocked because the thread
  bound and queue capacities are reached
- **`termination-wait-duration`** — a *java.time.Duration* to wait for the ExecutorService to
  terminate when the component is stopped.  A duration of zero means don't wait at all.  If not
  specified, then wait indefinitely.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close