Class CompilerPathCache

java.lang.Object
com.espertech.esper.compiler.client.option.CompilerPathCache
Direct Known Subclasses:
CompilerPathCacheImpl

public class CompilerPathCache extends Object
For optional use with the compiler, for speeding up compilation when the compiler path has one or more EPCompiled instances that provide visible EPL objects (named windows, tables etc.), this cache retains and helps reuse the information in respect to each EPCompiled instance and the visible EPL objects it provides.

The compiler is a stateless service and does not retain information between invocations.

The compiler uses the cache, when provided, for any EPCompiled instances in the compiler path to determine the visible EPL objects for that EPCompiled. Thus the compiler does not need to perform any classloading or initialization of EPL objects for the EPCompiled thus reducing compilation time when there is a compiler path with EPCompiled instances in the path.

The compiler, upon successful compilation of an EPL module (not a fire-and-forget query), populates the cache with the output EPCompiled and its EPL objects.

The compiler, upon successful loading of an EPCompiled from the compiler path, populates the cache with the loaded EPCompiled and its EPL objects.

Alternatively an application can deploy to a runtime and use the runtime path.

  • Constructor Details

    • CompilerPathCache

      public CompilerPathCache()
  • Method Details

    • getInstance

      public static CompilerPathCache getInstance()
      Returns a cache that keeps a synchronized map of EPCompiled to EPL objects
      Returns:
      cache