(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.
(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.
(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.
(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
(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
(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.
(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.
(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.
(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`.
(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.
(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
(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.
(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.
(get-instance-thread-dump instance)
Inputs: [instance :- JRubyInstance]
Inputs: [instance :- JRubyInstance]
(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.
(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.
(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.
(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.
(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.
(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
(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.
(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).
(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}
(insert-poison-pill pool error)
Inputs: [pool :- jruby-schemas/pool-queue-type error :- Throwable]
Inputs: [pool :- jruby-schemas/pool-queue-type error :- Throwable]
(insert-shutdown-poison-pill pool)
Inputs: [pool :- jruby-schemas/pool-queue-type]
Inputs: [pool :- jruby-schemas/pool-queue-type]
(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.
(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.
(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.
Enumeration of available JMX MBeans for a JRubyInstance.
Enumeration of available JMX MBeans for a JRubyInstance.
(management-enabled? instance)
Inputs: [instance :- JRubyInstance] Returns: schema/Bool
Inputs: [instance :- JRubyInstance] Returns: schema/Bool
(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`.
(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.
(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
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close