(->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.
(->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.
(->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.
(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).
(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-duration
— java.time.Duration from the end of one run to the start of the nextinitial-delay-duration
— java.time.Duration to wait before the first run of task
,
defaults to 0executor-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*
(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-duration
— java.time.Duration from the start of one run to the start of the nextinitial-delay-duration
— java.time.Duration to wait before the first run of task
,
defaults to 0executor-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*
(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-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 nextSee 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*
(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-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 nextSee 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*
(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 idlethread-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 reachedSee 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*
(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 idlemax-pool-size
— maximum number of threads to allow in the poolkeep-alive-duration
— when the number of threads is greater than the core, the maximum
java.time.Duration to wait for new tasks before terminatingwork-queue
— queue to use for holding tasks before they are executedthread-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 reachedSee 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*
(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.
(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.
(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.
(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).
(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).
(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 idlethread-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 reachedtermination-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.
(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 idlemax-pool-size
— maximum number of threads to allow in the poolkeep-alive-duration
— when the number of threads is greater than the core, the maximum
java.time.Duration to wait for new tasks before terminatingwork-queue
— queue to use for holding tasks before they are executedthread-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 reachedtermination-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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close