(->ExecutorServiceComponent make-executor-service-fn 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.
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
                                     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.
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.
scheduled-thread-pool component is started when this component is started and
stopped when this component is stopped.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.
(fixed-delay-scheduled-task task
                            delay-duration
                            &
                            {:keys [initial-delay-duration executor-service]})Make a new fixed delay ScheduledTaskComponent wrapping a ScheduledFuture.
task,
defaults to 0scheduled-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 no-argument function to run as a scheduled task - **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
                           &
                           {:keys [initial-delay-duration executor-service]})Make a new fixed rate ScheduledTaskComponent wrapping a ScheduledFuture.
task,
defaults to 0scheduled-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 no-argument function to run as a scheduled task - **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
                                 {:keys [task initial-delay-duration
                                         delay-duration]})Make a ScheduledFuture for wrapping by ScheduledTaskComponent.
scheduled-thread-pool component is started when this component is started and
stopped when this component is stopped.taskSee 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 no-argument function to run as a scheduled task - **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
                                {:keys [task initial-delay-duration
                                        period-duration]})Make a ScheduledFuture for wrapping by ScheduledTaskComponent.
scheduled-thread-pool component is started when this component is started and
stopped when this component is stopped.taskSee 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 no-argument function to run as a scheduled task - **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.
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*
(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.
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*
(map->ExecutorServiceComponent &
                               {:keys [make-executor-service-fn
                                       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.
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
                                                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.
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.
scheduled-thread-pool component is started when this component is started and
stopped when this component is stopped.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-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.
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.
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 builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |