|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.sswap.api.servlet.RRGCache
public class RRGCache
Manages cached RRGs and information about them (including information about RRGs that have not yet been computed, but they already have a token (identifier) so that the clients can query/poll for them). The underlying cache implementation is currently provided by EHCache
Field Summary | |
---|---|
static int |
DEFAULT_SUGGESTED_POLLING_INTERVAL
Default suggested polling interval (in milliseconds) |
Method Summary | |
---|---|
static RRGCache |
get()
Accessor for the singleton instance |
info.sswap.api.servlet.RRGCache.Entry |
get(java.lang.String token)
Gets an entry for a (possibly future) RRG. |
boolean |
isActive()
|
void |
setError(java.lang.String token,
java.lang.String error)
Sets an error message, indicating that computation of the particular RRG has failed. |
void |
setStatus(java.lang.String token,
java.lang.String status)
|
void |
setSuggestedPollingInterval(java.lang.String token,
int suggestedPollingInterval)
Sets suggested polling interval for a (potentially future) RRG identified by a token. |
void |
shutdown()
|
void |
store(java.lang.String token,
RRG rrg)
Stores a computed RRG, indicating that the computation of an RRG was successful, and allowing its future retrieval by the client. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_SUGGESTED_POLLING_INTERVAL
Method Detail |
---|
public static RRGCache get()
public void setSuggestedPollingInterval(java.lang.String token, int suggestedPollingInterval)
token
- the token identifying the (potentially future) RRGsuggestedPollingInterval
- suggested polling interval in millisecondspublic void setError(java.lang.String token, java.lang.String error)
token
- the token identifying the RRG that has been computederror
- the error messagepublic void setStatus(java.lang.String token, java.lang.String status)
public void store(java.lang.String token, RRG rrg)
token
- the token identifying the RRG that has been computedrrg
- the computed RRGpublic info.sswap.api.servlet.RRGCache.Entry get(java.lang.String token)
token
- the token for which the entry should be obtained
public boolean isActive()
public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |