Liking cljdoc? Tell your friends :D

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


borrow-from-poolclj

(borrow-from-pool pool-context)

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

Borrows a JRuby interpreter from the pool. If there are no instances left in the pool then this function will block until there is one available.

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

Borrows a JRuby interpreter from the pool. If there are no instances
left in the pool then this function will block until there is one available.
sourceraw docstring

borrow-from-pool!*clj

(borrow-from-pool!* borrow-fn pool)

Inputs: [borrow-fn :- (schema/pred ifn?) pool :- jruby-schemas/pool-queue-type] Returns: jruby-schemas/JRubyBorrowResult

Given a borrow function and a pool, attempts to borrow a JRubyInstance from a pool. If successful, updates the state information and returns the JRubyInstance. Returns nil if the borrow function returns nil; throws an exception if the borrow function's return value indicates an error condition.

Inputs: [borrow-fn :- (schema/pred ifn?) pool :- jruby-schemas/pool-queue-type]
Returns: jruby-schemas/JRubyBorrowResult

Given a borrow function and a pool, attempts to borrow a JRubyInstance from a pool.
If successful, updates the state information and returns the JRubyInstance.
Returns nil if the borrow function returns nil; throws an exception if
the borrow function's return value indicates an error condition.
sourceraw docstring

borrow-from-pool-with-timeoutclj

(borrow-from-pool-with-timeout pool-context timeout)

Inputs: [pool-context :- jruby-schemas/PoolContext timeout :- schema/Int] Returns: jruby-schemas/JRubyBorrowResult

Borrows a JRuby interpreter from the pool, like borrow-from-pool but a blocking timeout is provided. If an instance is available then it will be immediately returned to the caller, if not then this function will block waiting for an instance to be free for the number of milliseconds given in timeout. If the timeout runs out then nil will be returned, indicating that there were no instances available.

Inputs: [pool-context :- jruby-schemas/PoolContext timeout :- schema/Int]
Returns: jruby-schemas/JRubyBorrowResult

Borrows a JRuby interpreter from the pool, like borrow-from-pool but a
blocking timeout is provided. If an instance is available then it will be
immediately returned to the caller, if not then this function will block
waiting for an instance to be free for the number of milliseconds given in
timeout. If the timeout runs out then nil will be returned, indicating that
there were no instances available.
sourceraw docstring

borrow-with-timeout-fnclj

(borrow-with-timeout-fn timeout pool)

Inputs: [timeout :- schema/Int pool :- jruby-schemas/pool-queue-type] Returns: jruby-schemas/JRubyInternalBorrowResult

Inputs: [timeout :- schema/Int pool :- jruby-schemas/pool-queue-type]
Returns: jruby-schemas/JRubyInternalBorrowResult
sourceraw docstring

borrow-without-timeout-fnclj

(borrow-without-timeout-fn pool)

Inputs: [pool :- jruby-schemas/pool-queue-type] Returns: jruby-schemas/JRubyInternalBorrowResult

Inputs: [pool :- jruby-schemas/pool-queue-type]
Returns: jruby-schemas/JRubyInternalBorrowResult
sourceraw docstring

cleanup-pool-instance!clj

(cleanup-pool-instance! {:keys [scripting-container] :as instance} cleanup-fn)

Inputs: [{:keys [scripting-container], :as instance} :- JRubyInstance cleanup-fn :- IFn]

Cleans up and cleanly terminates a JRubyInstance and removes it from the pool.

Inputs: [{:keys [scripting-container], :as instance} :- JRubyInstance cleanup-fn :- IFn]

Cleans up and cleanly terminates a JRubyInstance and removes it from the pool.
sourceraw docstring

create-pool-from-configclj

(create-pool-from-config config)

Inputs: [config :- jruby-schemas/JRubyConfig] Returns: jruby-schemas/PoolState

Create a new PoolState based on the config input.

Inputs: [config :- jruby-schemas/JRubyConfig]
Returns: jruby-schemas/PoolState

Create a new PoolState based on the config input.
sourceraw docstring

create-pool-instance!clj

(create-pool-instance! pool id config)
(create-pool-instance! pool id config initial-jruby?)

Inputs: ([pool :- jruby-schemas/pool-queue-type id :- schema/Int config :- jruby-schemas/JRubyConfig] [pool :- jruby-schemas/pool-queue-type id :- schema/Int config :- jruby-schemas/JRubyConfig initial-jruby? :- schema/Bool]) Returns: JRubyInstance

Creates a new JRubyInstance and adds it to the pool.

Inputs: ([pool :- jruby-schemas/pool-queue-type id :- schema/Int config :- jruby-schemas/JRubyConfig] [pool :- jruby-schemas/pool-queue-type id :- schema/Int config :- jruby-schemas/JRubyConfig initial-jruby? :- schema/Bool])
Returns: JRubyInstance

Creates a new JRubyInstance and adds it to the pool.
sourceraw docstring

create-scripting-containerclj

(create-scripting-container config)

Inputs: [config :- jruby-schemas/JRubyConfig] Returns: ScriptingContainer

Creates an instance of org.jruby.embed.ScriptingContainer.

Inputs: [config :- jruby-schemas/JRubyConfig]
Returns: ScriptingContainer

Creates an instance of `org.jruby.embed.ScriptingContainer`.
sourceraw docstring

empty-scripting-containerclj

(empty-scripting-container config)

Inputs: [config :- jruby-schemas/JRubyConfig] Returns: ScriptingContainer

Creates a clean instance of a JRuby ScriptingContainer with no code loaded.

Inputs: [config :- jruby-schemas/JRubyConfig]
Returns: ScriptingContainer

Creates a clean instance of a JRuby `ScriptingContainer` with no code loaded.
sourceraw docstring

get-compile-modeclj

(get-compile-mode config-compile-mode)

Inputs: [config-compile-mode :- jruby-schemas/SupportedJRubyCompileModes] Returns: RubyInstanceConfig$CompileMode

Inputs: [config-compile-mode :- jruby-schemas/SupportedJRubyCompileModes]
Returns: RubyInstanceConfig$CompileMode
sourceraw docstring

get-creation-serviceclj

(get-creation-service context)

Inputs: [context :- jruby-schemas/PoolContext] Returns: ExecutorService

Gets the ExecutorService that will execute instance creation and termination.

Inputs: [context :- jruby-schemas/PoolContext]
Returns: ExecutorService

Gets the ExecutorService that will execute instance creation and termination.
sourceraw docstring

get-flush-timeoutclj

(get-flush-timeout context)

Inputs: [context :- jruby-schemas/PoolContext] Returns: schema/Int

Gets the size of the JRuby pool from the pool context.

Inputs: [context :- jruby-schemas/PoolContext]
Returns: schema/Int

Gets the size of the JRuby pool from the pool context.
sourceraw docstring

get-instance-state-containerclj

(get-instance-state-container instance)

Inputs: [instance :- JRubyInstance] Returns: jruby-schemas/JRubyInstanceStateContainer

Gets the InstanceStateContainer (atom) from the instance.

Inputs: [instance :- JRubyInstance]
Returns: jruby-schemas/JRubyInstanceStateContainer

Gets the InstanceStateContainer (atom) from the instance.
sourceraw docstring

get-instance-thread-dumpclj

(get-instance-thread-dump instance)

Inputs: [instance :- JRubyInstance]

Inputs: [instance :- JRubyInstance]
sourceraw docstring

get-jruby-runtimeclj

(get-jruby-runtime {:keys [scripting-container]})

Inputs: [{:keys [scripting-container]} :- JRubyInstance] Returns: Ruby

Get the org.jruby.Ruby instance associated with member of the pool.

Inputs: [{:keys [scripting-container]} :- JRubyInstance]
Returns: Ruby

Get the org.jruby.Ruby instance associated with member of the pool.
sourceraw docstring

get-poolclj

(get-pool context)

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

Gets the JRuby pool object from the pool context.

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

Gets the JRuby pool object from the pool context.
sourceraw docstring

get-pool-sizeclj

(get-pool-size context)

Inputs: [context :- jruby-schemas/PoolContext] Returns: schema/Int

Gets the size of the JRuby pool from the pool context.

Inputs: [context :- jruby-schemas/PoolContext]
Returns: schema/Int

Gets the size of the JRuby pool from the pool context.
sourceraw docstring

get-pool-stateclj

(get-pool-state context)

Inputs: [context :- jruby-schemas/PoolContext] Returns: jruby-schemas/PoolState

Gets the PoolState from the pool context.

Inputs: [context :- jruby-schemas/PoolContext]
Returns: jruby-schemas/PoolState

Gets the PoolState from the pool context.
sourceraw docstring

get-pool-state-containerclj

(get-pool-state-container context)

Inputs: [context :- jruby-schemas/PoolContext] Returns: jruby-schemas/PoolStateContainer

Gets the PoolStateContainer from the pool context.

Inputs: [context :- jruby-schemas/PoolContext]
Returns: jruby-schemas/PoolStateContainer

Gets the PoolStateContainer from the pool context.
sourceraw docstring

get-profiling-modeclj

(get-profiling-mode config-profiling-mode)

Inputs: [config-profiling-mode :- jruby-schemas/SupportedJRubyProfilingModes] Returns: RubyInstanceConfig$ProfilingMode

Inputs: [config-profiling-mode :- jruby-schemas/SupportedJRubyProfilingModes]
Returns: RubyInstanceConfig$ProfilingMode
sourceraw docstring

init-jrubyclj

(init-jruby jruby config)

Inputs: [jruby :- jruby-schemas/ConfigurableJRuby config :- jruby-schemas/JRubyConfig] Returns: jruby-schemas/ConfigurableJRuby

Applies configuration to a JRuby... thing. See comments in ConfigurableJRuby schema for more details.

Inputs: [jruby :- jruby-schemas/ConfigurableJRuby config :- jruby-schemas/JRubyConfig]
Returns: jruby-schemas/ConfigurableJRuby

Applies configuration to a JRuby... thing.  See comments in `ConfigurableJRuby`
schema for more details.
sourceraw docstring

initial-borrows-valueclj

(initial-borrows-value id total-instances total-borrows initial-jruby?)

Inputs: [id :- schema/Int total-instances :- schema/Int total-borrows :- schema/Int initial-jruby? :- schema/Bool] Returns: (schema/maybe schema/Int)

Determines how many borrows before instance of given id should be flushed in order to best splay it. Returns nil if not applicable (either not initial-jruby? or there are more instances than max-borrows).

Inputs: [id :- schema/Int total-instances :- schema/Int total-borrows :- schema/Int initial-jruby? :- schema/Bool]
Returns: (schema/maybe schema/Int)

Determines how many borrows before instance of given id should be flushed
in order to best splay it. Returns nil if not applicable (either not
`initial-jruby?` or there are more instances than max-borrows).
sourceraw docstring

initialize-gem-pathclj

(initialize-gem-path {:keys [gem-path gem-home] :as jruby-config})

Inputs: [{:keys [gem-path gem-home], :as jruby-config} :- #:schema{Keyword schema/Any}] Returns: #:schema{Keyword schema/Any}

Inputs: [{:keys [gem-path gem-home], :as jruby-config} :- #:schema{Keyword schema/Any}]
Returns: #:schema{Keyword schema/Any}
sourceraw docstring

insert-poison-pillclj

(insert-poison-pill pool error)

Inputs: [pool :- jruby-schemas/pool-queue-type error :- Throwable]

Inputs: [pool :- jruby-schemas/pool-queue-type error :- Throwable]
sourceraw docstring

insert-shutdown-poison-pillclj

(insert-shutdown-poison-pill pool)

Inputs: [pool :- jruby-schemas/pool-queue-type]

Inputs: [pool :- jruby-schemas/pool-queue-type]
sourceraw docstring

instantiate-instance-poolclj

(instantiate-instance-pool size)

Instantiate a new queue object to use as the pool of free JRuby's.

Instantiate a new queue object to use as the pool of free JRuby's.
sourceraw docstring

instantiate-reference-poolclj

(instantiate-reference-pool max-concurrent-borrows)

Instantiate a new queue object to use as the pool of free JRuby's.

Instantiate a new queue object to use as the pool of free JRuby's.
sourceraw docstring

jmx-bean-nameclj

(jmx-bean-name instance service-name)

Inputs: [instance :- JRubyInstance service-name :- JRubyMBeanName] Returns: schema/Str

Get the fully-qualified name of a JMX MBean attached to a JRubyInstance.

Inputs: [instance :- JRubyInstance service-name :- JRubyMBeanName]
Returns: schema/Str

Get the fully-qualified name of a JMX MBean attached to a JRubyInstance.
sourceraw docstring

JRubyMBeanNameclj

Enumeration of available JMX MBeans for a JRubyInstance.

Enumeration of available JMX MBeans for a JRubyInstance.
sourceraw docstring

management-enabled?clj

(management-enabled? instance)

Inputs: [instance :- JRubyInstance] Returns: schema/Bool

Inputs: [instance :- JRubyInstance]
Returns: schema/Bool
sourceraw docstring

new-mainclj

(new-main config)

Inputs: [config :- jruby-schemas/JRubyConfig] Returns: jruby-schemas/JRubyMain

Return a new JRubyMain instance which should only be used for CLI purposes, e.g. for the ruby, gem, and irb subcommands. Internal core services should use create-scripting-container instead of new-main.

Inputs: [config :- jruby-schemas/JRubyConfig]
Returns: jruby-schemas/JRubyMain

Return a new JRubyMain instance which should only be used for CLI purposes,
e.g. for the ruby, gem, and irb subcommands.  Internal core services should
use `create-scripting-container` instead of `new-main`.
sourceraw docstring

set-config-encodingclj

(set-config-encoding kcode jruby)

Inputs: [kcode :- KCode jruby :- RubyInstanceConfig] Returns: RubyInstanceConfig

Sets the K code, source encoding, and external encoding of the JRuby config to the supplied encoding.

Inputs: [kcode :- KCode jruby :- RubyInstanceConfig]
Returns: RubyInstanceConfig

Sets the K code, source encoding, and external encoding of the JRuby config to
the supplied encoding.
sourceraw docstring

set-ruby-encodingclj

(set-ruby-encoding kcode jruby)

Inputs: [kcode :- KCode jruby :- jruby-schemas/ConfigurableJRuby] Returns: jruby-schemas/ConfigurableJRuby

Inputs: [kcode :- KCode jruby :- jruby-schemas/ConfigurableJRuby]
Returns: jruby-schemas/ConfigurableJRuby
sourceraw docstring

setup-profilingclj

(setup-profiling jruby profiler-output-file profiling-mode)

Inputs: [jruby :- jruby-schemas/ConfigurableJRuby profiler-output-file :- schema/Str profiling-mode :- schema/Keyword]

Takes a jruby and sets profiling mode and profiler output, appending the current time to the filename for uniqueness and notifying the user via log message of the profile file name.

Inputs: [jruby :- jruby-schemas/ConfigurableJRuby profiler-output-file :- schema/Str profiling-mode :- schema/Keyword]

Takes a jruby and sets profiling mode and profiler output, appending the
current time to the filename for uniqueness and notifying the user via log
message of the profile file name.
sourceraw docstring

throw-jruby-lock-timeoutclj

(throw-jruby-lock-timeout exception)
source

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

× close