Interface JexlCache<K,V>

Type Parameters:
K - source
V - script or template

public interface JexlCache<K,V>
Caching scripts or templates interface.
  • Nested Class Summary Link icon

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A cached reference.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    int
    Returns the cache capacity, the maximum number of elements it can contain.
    void
    Clears the cache.
    Produces the cache entry set.
    get(K key)
    Gets a value from cache.
    put(K key, V script)
    Puts a value in cache.
    int
    Returns the cache size, the actual number of elements it contains.
  • Method Details Link icon

    • capacity Link icon

      int capacity()
      Returns the cache capacity, the maximum number of elements it can contain.
      Returns:
      the cache capacity
    • clear Link icon

      void clear()
      Clears the cache.
    • entries Link icon

      Produces the cache entry set.

      For implementations testing only

      Returns:
      the cache entry list
    • get Link icon

      V get(K key)
      Gets a value from cache.
      Parameters:
      key - the cache entry key
      Returns:
      the cache entry value
    • put Link icon

      V put(K key, V script)
      Puts a value in cache.
      Parameters:
      key - the cache entry key
      script - the cache entry value
      Returns:
      the previously associated value if any
    • size Link icon

      int size()
      Returns the cache size, the actual number of elements it contains.
      Returns:
      the cache size