Package org.jruby.embed.internal
Class ConcurrentLocalContextProvider
java.lang.Object
org.jruby.embed.internal.AbstractLocalContextProvider
org.jruby.embed.internal.ConcurrentLocalContextProvider
- All Implemented Interfaces:
LocalContextProvider
Concurrent type local context provider.
Ruby runtime returned from the getRuntime() method is a classloader-global runtime.
While variables (except global variables) and constants are thread local.
- Author:
- Yoko Harada <[email protected]>
-
Field Summary
Fields inherited from class org.jruby.embed.internal.AbstractLocalContextProvider
behavior, config, lazy
-
Constructor Summary
ConstructorsConstructorDescriptionConcurrentLocalContextProvider
(LocalVariableBehavior behavior, boolean lazy) -
Method Summary
Modifier and TypeMethodDescriptionReturns an attribute map of a specified scope.Gets an instance ofRubyInstanceConfig
.Returns a Ruby runtime of a specified scope.Returns aBiVariableMap
of a specified scope.boolean
Tests whether Ruby runtime has been initialized or not.void
Clears up a variable map.Methods inherited from class org.jruby.embed.internal.AbstractLocalContextProvider
getInstance, getLocalVariableBehavior
-
Constructor Details
-
ConcurrentLocalContextProvider
-
ConcurrentLocalContextProvider
-
-
Method Details
-
getRuntime
Description copied from interface:LocalContextProvider
Returns a Ruby runtime of a specified scope.- Returns:
- a Ruby runtime
-
getRubyInstanceConfig
Description copied from interface:LocalContextProvider
Gets an instance ofRubyInstanceConfig
.- Specified by:
getRubyInstanceConfig
in interfaceLocalContextProvider
- Overrides:
getRubyInstanceConfig
in classAbstractLocalContextProvider
- Returns:
- an instance of RubyInstanceConfig.
-
getVarMap
Description copied from interface:LocalContextProvider
Returns aBiVariableMap
of a specified scope.- Returns:
- a variable map
-
getAttributeMap
Description copied from interface:LocalContextProvider
Returns an attribute map of a specified scope.- Returns:
- an attribute map
-
isRuntimeInitialized
public boolean isRuntimeInitialized()Description copied from interface:LocalContextProvider
Tests whether Ruby runtime has been initialized or not.- Returns:
- true if initialized, false otherwise.
-
terminate
public void terminate()Description copied from interface:LocalContextProvider
Clears up a variable map.
-