(add-instance {:keys [config] :as pool-context} id)
Inputs: [{:keys [config], :as pool-context} :- jruby-schemas/PoolContext id :- schema/Int]
Inputs: [{:keys [config], :as pool-context} :- jruby-schemas/PoolContext id :- schema/Int]
(borrow-all-jrubies pool-context)
Inputs: [pool-context :- jruby-schemas/PoolContext] Returns: [JRubyInstance]
Locks the pool and borrows all the instances
Inputs: [pool-context :- jruby-schemas/PoolContext] Returns: [JRubyInstance] Locks the pool and borrows all the instances
(borrow-all-jrubies* pool-context borrow-exception)
Inputs: [pool-context :- jruby-schemas/PoolContext borrow-exception :- IDeref]
The core logic for borrow-all-jrubies. Should only be called from borrow-all-jrubies
Inputs: [pool-context :- jruby-schemas/PoolContext borrow-exception :- IDeref] The core logic for borrow-all-jrubies. Should only be called from borrow-all-jrubies
(cleanup-and-refill-pool pool-context old-instances refill?)
Inputs: [pool-context :- jruby-schemas/PoolContext old-instances :- [JRubyInstance] refill? :- schema/Bool]
Cleans up the given instances and optionally refills the pool with new instances. Should only be called from the modify-instance-agent
Inputs: [pool-context :- jruby-schemas/PoolContext old-instances :- [JRubyInstance] refill? :- schema/Bool] Cleans up the given instances and optionally refills the pool with new instances. Should only be called from the modify-instance-agent
(drain-and-refill-pool! pool-context refill?)
(drain-and-refill-pool! pool-context refill? on-complete)
Inputs: ([pool-context :- jruby-schemas/PoolContext refill? :- schema/Bool] [pool-context :- jruby-schemas/PoolContext refill? :- schema/Bool on-complete :- IDeref])
Borrow and destroy all the jruby instances, optionally refilling the pool with fresh jrubies. Locks the pool in order to drain it, but releases the lock before destroying the instances and refilling the pool
If an on-complete promise is given, it can be used by the caller to make this function syncronous. Otherwise it only blocks until the pool instances have been borrowed and the cleanup-and-refill-pool fn is sent to the agent
Inputs: ([pool-context :- jruby-schemas/PoolContext refill? :- schema/Bool] [pool-context :- jruby-schemas/PoolContext refill? :- schema/Bool on-complete :- IDeref]) Borrow and destroy all the jruby instances, optionally refilling the pool with fresh jrubies. Locks the pool in order to drain it, but releases the lock before destroying the instances and refilling the pool If an on-complete promise is given, it can be used by the caller to make this function syncronous. Otherwise it only blocks until the pool instances have been borrowed and the cleanup-and-refill-pool fn is sent to the agent
(execute-tasks! tasks task-executor)
Inputs: [tasks :- [IFn] task-executor :- ExecutorService]
Inputs: [tasks :- [IFn] task-executor :- ExecutorService]
(flush-and-repopulate-pool! pool-context)
Inputs: [pool-context :- jruby-schemas/PoolContext]
Flush of the current JRuby pool. Blocks until all the instances have been borrowed from the pool, but does not wait for the instances to be flushed or recreated
Inputs: [pool-context :- jruby-schemas/PoolContext] Flush of the current JRuby pool. Blocks until all the instances have been borrowed from the pool, but does not wait for the instances to be flushed or recreated
(flush-instance! pool-context instance new-id config)
Inputs: [pool-context :- jruby-schemas/PoolContext instance :- JRubyInstance new-id :- schema/Int config :- jruby-schemas/JRubyConfig]
Flush a single JRubyInstance. Create a new replacement instance and insert it into the specified pool. Should only be called from the modify-instance-agent
Inputs: [pool-context :- jruby-schemas/PoolContext instance :- JRubyInstance new-id :- schema/Int config :- jruby-schemas/JRubyConfig] Flush a single JRubyInstance. Create a new replacement instance and insert it into the specified pool. Should only be called from the modify-instance-agent
(flush-pool-for-shutdown! pool-context)
Inputs: [pool-context :- jruby-schemas/PoolContext]
Flush of the current JRuby pool when shutting down during a stop.
Inputs: [pool-context :- jruby-schemas/PoolContext] Flush of the current JRuby pool when shutting down during a stop.
(get-modify-instance-agent pool-context)
Inputs: [pool-context :- jruby-schemas/PoolContext] Returns: jruby-schemas/JRubyPoolAgent
Inputs: [pool-context :- jruby-schemas/PoolContext] Returns: jruby-schemas/JRubyPoolAgent
(get-shutdown-on-error-fn pool-context)
Inputs: [pool-context :- jruby-schemas/PoolContext] Returns: IFn
Inputs: [pool-context :- jruby-schemas/PoolContext] Returns: IFn
(next-instance-id id pool-context)
Inputs: [id :- schema/Int pool-context :- jruby-schemas/PoolContext] Returns: schema/Int
Inputs: [id :- schema/Int pool-context :- jruby-schemas/PoolContext] Returns: schema/Int
(pool-agent shutdown-on-error-fn)
Inputs: [shutdown-on-error-fn :- (schema/pred ifn?)] Returns: jruby-schemas/JRubyPoolAgent
Given a shutdown-on-error function, create an agent suitable for use in managing JRuby pools.
Inputs: [shutdown-on-error-fn :- (schema/pred ifn?)] Returns: jruby-schemas/JRubyPoolAgent Given a shutdown-on-error function, create an agent suitable for use in managing JRuby pools.
(prime-pool! {:keys [config] :as pool-context})
Inputs: [{:keys [config], :as pool-context} :- jruby-schemas/PoolContext]
Fill the pool with new JRubyInstances. Instantiates the first JRuby (Puppet will sometimes alter the filesystem on first instantiation) and the remaining instances in parallel. NOTE: this function should never be called except by the modify-instance-agent to create a pool's initial jruby instances.
Inputs: [{:keys [config], :as pool-context} :- jruby-schemas/PoolContext] Fill the pool with new JRubyInstances. Instantiates the first JRuby (Puppet will sometimes alter the filesystem on first instantiation) and the remaining instances in parallel. NOTE: this function should never be called except by the modify-instance-agent to create a pool's initial jruby instances.
(send-agent jruby-agent f)
Inputs: [jruby-agent :- jruby-schemas/JRubyPoolAgent f :- IFn] Returns: jruby-schemas/JRubyPoolAgent
Utility function; given a JRubyPoolAgent, send the specified function.
Ensures that the function call is wrapped in a shutdown-on-error
.
Inputs: [jruby-agent :- jruby-schemas/JRubyPoolAgent f :- IFn] Returns: jruby-schemas/JRubyPoolAgent Utility function; given a JRubyPoolAgent, send the specified function. Ensures that the function call is wrapped in a `shutdown-on-error`.
(send-flush-instance! pool-context instance)
Inputs: [pool-context :- jruby-schemas/PoolContext instance :- JRubyInstance] Returns: jruby-schemas/JRubyPoolAgent
Sends requests to the flush-instance agent to flush the instance and create a new one.
Inputs: [pool-context :- jruby-schemas/PoolContext instance :- JRubyInstance] Returns: jruby-schemas/JRubyPoolAgent Sends requests to the flush-instance agent to flush the instance and create a new one.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close