|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cache
A cache records queries and corresponding answers. Queries which are already included in the cache will be answered by the cached response, saving queries to the actual target system.
Method Summary | |
---|---|
void |
addEntry(Word query,
Word answer)
Adds a query/answer pair to the cache |
boolean |
isCached(Word trace)
Checks if a given query is already included in the cache |
void |
setOracle(Oracle o)
Specifies Oracle to be called if a cache-miss is encountered |
Methods inherited from interface de.ls5.jlearn.interfaces.Oracle |
---|
processQuery |
Method Detail |
---|
void addEntry(Word query, Word answer) throws ObservationConflictException
query
- query to be cachedanswer
- response for the query to be cached
ObservationConflictException
- will be thrown if the query is already included in the cache, but with a different answerboolean isCached(Word trace)
trace
- query to be checked
void setOracle(Oracle o)
Oracle
to be called if a cache-miss is encountered
o
- Oracle
to be consulted if a query is not included in the cache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |