| Constructor and Description |
|---|
BasicRegistry() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(java.lang.String key)
Check if something is registered for the key.
|
void |
delete(java.lang.String key)
Delete the given key.
|
org.json.JSONObject |
getJSON(java.lang.String key)
Get a json object from the registry.
|
java.lang.Number |
getNumber(java.lang.String key)
Get a number from the registry.
|
java.lang.String |
getString(java.lang.String key)
Get string from the registry.
|
long |
getTimeToKeepAfterAccessInMillis()
Return the amount of time the registry will keep an entry before purging the record.
|
java.net.URI |
getURI(java.lang.String key)
Get a URI from the registry.
|
int |
incrementInt(java.lang.String key,
int amount)
Increment the value currently stored in the registry by the amount.
|
long |
incrementLong(java.lang.String key,
long amount)
Increment the value currently stored in the registry by the amount.
|
<T> T |
opt(java.lang.String key,
T defaultValue)
Get a value from the registry or return the default if the value is not in the registry.
|
void |
put(java.lang.String key,
org.json.JSONObject value)
Put a json object in the registry.
|
void |
put(java.lang.String key,
java.lang.Number value)
Put a number in the registry.
|
void |
put(java.lang.String key,
java.lang.String value)
Put a string in the registry.
|
void |
put(java.lang.String key,
java.net.URI value)
Put a URI in the registry.
|
void |
setTimeToKeepAfterAccessInMinutes(int timeToKeepAfterAccessInMinutes) |
public final void setTimeToKeepAfterAccessInMinutes(int timeToKeepAfterAccessInMinutes)
public final long getTimeToKeepAfterAccessInMillis()
RegistrygetTimeToKeepAfterAccessInMillis in interface Registrypublic void delete(java.lang.String key)
Registrypublic final boolean containsKey(java.lang.String key)
RegistrycontainsKey in interface Registrykey - key to check forpublic final void put(java.lang.String key,
java.net.URI value)
Registrypublic final long incrementLong(java.lang.String key,
long amount)
RegistryIf there is not value present in registry then a value will be registered as amount.
incrementLong in interface Registrykey - the key of the element to incrementamount - the amount to incrementpublic final int incrementInt(java.lang.String key,
int amount)
RegistryIf there is not value present in registry then a value will be registered as amount.
incrementInt in interface Registrykey - the key of the element to incrementamount - th amount to incrementpublic final java.net.URI getURI(java.lang.String key)
Registrypublic final void put(java.lang.String key,
java.lang.String value)
Registrypublic final java.lang.String getString(java.lang.String key)
Registrypublic final void put(java.lang.String key,
java.lang.Number value)
Registrypublic final java.lang.Number getNumber(java.lang.String key)
Registrypublic final <T> T opt(java.lang.String key,
T defaultValue)
Registrypublic final void put(java.lang.String key,
org.json.JSONObject value)
Registry