public interface Cache
Modifier and Type | Interface and Description |
---|---|
static interface |
Cache.Clock
A Clock-like object that says what the current time in milliseconds
is pretending to be.
|
static interface |
Cache.Controller |
static class |
Cache.Registry
The registry records named cache policies.
|
Modifier and Type | Method and Description |
---|---|
void |
cacheDescription(List<com.hp.hpl.jena.rdf.model.Resource> results,
String view,
APIResultSet rs,
long expiresAt)
Make an entry in the caches that associates the result set
rs
with the given list of resources and view. |
void |
cacheSelection(String selectQuery,
List<com.hp.hpl.jena.rdf.model.Resource> results,
long expiresAt)
Make an entry in the cache that binds the given list of results
to the given select query string.
|
void |
clear()
Clear this cache.
|
LimitedCacheBase.TimedThing<ResponseResult> |
fetch(URI requestURI) |
List<com.hp.hpl.jena.rdf.model.Resource> |
getCachedResources(String select)
Answer the list of resources associated with this select query if
any is available (entered and not discarded).
|
LimitedCacheBase.TimedThing<APIResultSet> |
getCachedResultSet(List<com.hp.hpl.jena.rdf.model.Resource> results,
String view)
Answer the API result set remembered for the given list of results and
view, or null if there isn't one.
|
int |
getCount(String countQueryString)
Get the total number of items that this query will return.
|
int |
numEntries()
Answer how many entries are in this cache.
|
void |
putCount(String countQueryString,
int count,
long expiresAt)
Put the total number of items that this query returns.
|
void |
resetCounts()
Reset to suitable zeroes the counts of this cache.
|
void |
show(StringBuilder sb)
Append an HTML description of this cache to
sb . |
void |
store(URI requestURI,
ResponseResult result,
long expiresAt) |
String |
summary()
Answer a summary description of this cache.
|
LimitedCacheBase.TimedThing<ResponseResult> fetch(URI requestURI)
void store(URI requestURI, ResponseResult result, long expiresAt)
void cacheSelection(String selectQuery, List<com.hp.hpl.jena.rdf.model.Resource> results, long expiresAt)
List<com.hp.hpl.jena.rdf.model.Resource> getCachedResources(String select)
void cacheDescription(List<com.hp.hpl.jena.rdf.model.Resource> results, String view, APIResultSet rs, long expiresAt)
rs
with the given list of resources and view.LimitedCacheBase.TimedThing<APIResultSet> getCachedResultSet(List<com.hp.hpl.jena.rdf.model.Resource> results, String view)
void clear()
void resetCounts()
void show(StringBuilder sb)
sb
.int numEntries()
String summary()
int getCount(String countQueryString)
void putCount(String countQueryString, int count, long expiresAt)
Copyright © 2014. All Rights Reserved.