Class LuaCache

java.lang.Object
com.aerospike.client.lua.LuaCache

public final class LuaCache extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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
    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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static final org.luaj.vm2.Prototype loadPackageFromFile(String packageName)
      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

      public static final void clearPackage(String packageName)
      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.