Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


com.sigmadynamics.sdo.rules
Interface RuleCache


public interface RuleCache

An external rule cache interface. External rule metadata is converted to java source files and then compiled during runtime. Once an external rule is compiled, the associated bytecode is cached for fast evaluation the subsequent times the same rule is encountered.

Since:
3.0

Method Summary
 void clear()
          clear the RuleCache.
 Rule get(RuleDefinition def)
           
 int getNumberOfRules()
           
 int getSizeInBytes()
           
 Rule put(RuleDefinition def, byte[] byteCode)
           
 Rule putInvalid(RuleDefinition def)
           
 void removeInactiveRules(double hours)
           

 

Method Detail

put

Rule put(RuleDefinition def,
         byte[] byteCode)
Parameters:
def - The RuleDefinition to be cached.
byteCode - Compiled bytecode version of the rule stored in def.
Returns:
Rule An instance of Rule that can be evaluated. Put this rule in the cache.

get

Rule get(RuleDefinition def)
Parameters:
def - The RuleDefinition to be retrieved from the cache.
Returns:
Rule An instance of Rule that can be evaluated. Get the Rule that corresponds to def from the cache.

putInvalid

Rule putInvalid(RuleDefinition def)
Parameters:
def - RuleDefinition that has been detected as invalid.
Returns:
a Rule instance rule, such that rule.isInvalid == true.

getSizeInBytes

int getSizeInBytes()
Returns:
estimated cache size in bytes.

clear

void clear()
clear the RuleCache.

removeInactiveRules

void removeInactiveRules(double hours)
Parameters:
hours - remove the rules from the cache that have not been accessed for specified number of hours.

getNumberOfRules

int getNumberOfRules()
Returns:
the number of rules (including invalid rules) in this RuleCache.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Real-Time Decisions
11g Release 1 (11.1.1)

E17787-02


Copyright © 2010, 2011, Oracle. All rights reserved.