|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gcube.search.rseprcache.RSEPRCache
public class RSEPRCache
This class implements a cache for storing Result Set EPRs that correspond to specific query results. Provides a get method that retrieves a Result Set EPR, when it is given the query that produced the Result Set, as a key. It also provides an add method that adds a pair of query-ResultSet.
| Constructor Summary | |
|---|---|
RSEPRCache(GCUBESecurityManager sman,
GCUBEScope sc)
Default constructor of RSEPRCache that should be used by gCube components that are not exposed as services. |
|
RSEPRCache(GCUBEServiceContext sctx)
Default constructor of RSEPRCache that should be used by gCube services. |
|
RSEPRCache(GCUBEServiceContext sctx,
long ttl,
long tti,
int maxElementsInMemory)
Constructor of RSEPRCache that takes configuration parameters and creates a new cache with this configuration. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.Object query,
java.lang.String rsEpr)
Adds a pair of query-RS EPR to the given cache |
java.lang.String |
get(java.lang.Object query)
Retrieves a ResultSet EPR given the query that produced the ResultSet |
int |
size()
Size of the cache used |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RSEPRCache(GCUBESecurityManager sman,
GCUBEScope sc)
throws java.lang.Exception
sman - a security manager that will be used to register to the notifications topicsc - the infrastructure scope of this scope will be used for subscribing to the topic
java.lang.Exception
public RSEPRCache(GCUBEServiceContext sctx)
throws java.lang.Exception
sctx - the context of the service that will be used to register to the notifications topic
java.lang.Exception
public RSEPRCache(GCUBEServiceContext sctx,
long ttl,
long tti,
int maxElementsInMemory)
throws java.lang.Exception
sctx - the context of the service that will be used to register to the notifications topicttl - the default amount of time to live for an element from its creation datetti - the default amount of time to live for an element from its last accessed datemaxElementsInMemory - the maximum number of elements in memory, before they are evicted
java.lang.Exception| Method Detail |
|---|
public void add(java.lang.Object query,
java.lang.String rsEpr)
throws java.lang.Exception
query - the key used to identify the added object in the cache. Equality is examined using the equals() method that is defined in the class of the query objectrsEpr - the corresponding RS EPR for the results produced by the query
java.lang.Exceptionpublic java.lang.String get(java.lang.Object query)
query - the query that produced the ResultSet. Equality is examined using the equals() method that is defined in the class of the query object
public int size()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||