Liking cljdoc? Tell your friends :D

puppetlabs.services.jruby-pool-manager.impl.jruby-agents


add-instanceclj

(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]
sourceraw docstring

borrow-all-jrubiesclj

(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
sourceraw docstring

borrow-all-jrubies*clj

(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
sourceraw docstring

cleanup-and-refill-poolclj

(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
sourceraw docstring

drain-and-refill-pool!clj

(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
sourceraw docstring

flush-and-repopulate-pool!clj

(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
sourceraw docstring

flush-instance!clj

(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
sourceraw docstring

flush-pool-for-shutdown!clj

(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.
sourceraw docstring

get-modify-instance-agentclj

(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
sourceraw docstring

get-shutdown-on-error-fnclj

(get-shutdown-on-error-fn pool-context)

Inputs: [pool-context :- jruby-schemas/PoolContext] Returns: IFn

Inputs: [pool-context :- jruby-schemas/PoolContext]
Returns: IFn
sourceraw docstring

next-instance-idclj

(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
sourceraw docstring

pool-agentclj

(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.
sourceraw docstring

prime-pool!clj

(prime-pool! {:keys [config] :as pool-context})

Inputs: [{:keys [config], :as pool-context} :- jruby-schemas/PoolContext]

Sequentially fill the pool with new JRubyInstances. 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]

Sequentially fill the pool with new JRubyInstances.  NOTE: this
function should never be called except by the modify-instance-agent
to create a pool's initial jruby instances.
sourceraw docstring

send-agentclj

(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`.
sourceraw docstring

send-flush-instance!clj

(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.
sourceraw docstring

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

× close