Package com.aerospike.client.lua
Class LuaCache
java.lang.Object
com.aerospike.client.lua.LuaCache
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final void
clearPackage
(String packageName) Remove lua package from cache and unload package from non-active lua instances.static final void
Remove all lua packages and non-active lua instances from cache.static final com.aerospike.client.lua.LuaInstance
Return lua instance from a pool.static final org.luaj.vm2.Prototype
loadPackageFromFile
(String packageName) Load lua package from a file.static final org.luaj.vm2.Prototype
loadPackageFromResource
(ClassLoader resourceLoader, String resourcePath, String packageName) Load lua package from a resource.static final void
putInstance
(com.aerospike.client.lua.LuaInstance instance) Put lua instance back into pool if pool size (LuaConfig.InstancePoolSize) would not be exceeded.
-
Constructor Details
-
LuaCache
public LuaCache()
-
-
Method Details
-
getInstance
public static final com.aerospike.client.lua.LuaInstance getInstance()Return lua instance from a pool. If a lua instance is not available, a new instance will be created. -
putInstance
public static final void putInstance(com.aerospike.client.lua.LuaInstance instance) Put lua instance back into pool if pool size (LuaConfig.InstancePoolSize) would not be exceeded. -
loadPackageFromFile
Load lua package from a file. -
loadPackageFromResource
public static final org.luaj.vm2.Prototype loadPackageFromResource(ClassLoader resourceLoader, String resourcePath, String packageName) Load lua package from a resource. -
clearPackage
Remove lua package from cache and unload package from non-active lua instances. This method assumes lua instances are not running concurrently with this call. Active lua instances will not have their packages unloaded. -
clearPackages
public static final void clearPackages()Remove all lua packages and non-active lua instances from cache. This method assumes lua instances are not running concurrently with this call. Active lua instances will not be removed.
-