java.lang.Object
com.orientechnologies.orient.core.metadata.security.OPredicateCache

public class OPredicateCache extends Object
This class is an LRU cache for already parsed SQL statement executors. It stores itself in the storage as a resource. It also acts an an entry point for the SQL parser.
Author:
Luigi Dell'Aquila (l.dellaquila-(at)-orientdb.com)
  • Constructor Details

    • OPredicateCache

      public OPredicateCache(int size)
      Parameters:
      size - the size of the cache
  • Method Details

    • contains

      public boolean contains(String statement)
      Parameters:
      statement - an SQL statement
      Returns:
      true if the corresponding executor is present in the cache
    • get

      public OOrBlock get(String statement)
      Parameters:
      statement - an SQL statement
      Returns:
      the corresponding executor, taking it from the internal cache, if it exists
    • parse

      protected static OOrBlock parse(String statement) throws OCommandSQLParsingException
      Throws:
      OCommandSQLParsingException
    • clear

      public void clear()