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 aBiVariableMapof a specified scope.booleanTests whether Ruby runtime has been initialized or not.voidClears 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:LocalContextProviderReturns a Ruby runtime of a specified scope.- Returns:
- a Ruby runtime
-
getRubyInstanceConfig
Description copied from interface:LocalContextProviderGets an instance ofRubyInstanceConfig.- Specified by:
getRubyInstanceConfigin interfaceLocalContextProvider- Overrides:
getRubyInstanceConfigin classAbstractLocalContextProvider- Returns:
- an instance of RubyInstanceConfig.
-
getVarMap
Description copied from interface:LocalContextProviderReturns aBiVariableMapof a specified scope.- Returns:
- a variable map
-
getAttributeMap
Description copied from interface:LocalContextProviderReturns an attribute map of a specified scope.- Returns:
- an attribute map
-
isRuntimeInitialized
public boolean isRuntimeInitialized()Description copied from interface:LocalContextProviderTests whether Ruby runtime has been initialized or not.- Returns:
- true if initialized, false otherwise.
-
terminate
public void terminate()Description copied from interface:LocalContextProviderClears up a variable map.
-