Class BasicRegistry
java.lang.Object
org.mapfish.print.servlet.registry.BasicRegistry
- All Implemented Interfaces:
Registry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleancontainsKey(String key) Check if something is registered for the key.voidDelete the given key.final org.json.JSONObjectGet a json object from the registry.final NumberGet a number from the registry.final StringGet string from the registry.final longReturn the amount of time the registry will keep an entry before purging the record.final URIGet a URI from the registry.final intincrementInt(String key, int amount) Increment the value currently stored in the registry by the amount.final longincrementLong(String key, long amount) Increment the value currently stored in the registry by the amount.final <T> TGet a value from the registry or return the default if the value is not in the registry.final voidPut a number in the registry.final voidPut a string in the registry.final voidPut a URI in the registry.final voidPut a json object in the registry.final voidsetTimeToKeepAfterAccessInMinutes(int timeToKeepAfterAccessInMinutes)
-
Constructor Details
-
BasicRegistry
public BasicRegistry()
-
-
Method Details
-
setTimeToKeepAfterAccessInMinutes
public final void setTimeToKeepAfterAccessInMinutes(int timeToKeepAfterAccessInMinutes) -
getTimeToKeepAfterAccessInMillis
public final long getTimeToKeepAfterAccessInMillis()Description copied from interface:RegistryReturn the amount of time the registry will keep an entry before purging the record. This ability to purge old records prevents the registry from growing in size indefinitely.- Specified by:
getTimeToKeepAfterAccessInMillisin interfaceRegistry- Returns:
- the number of milliseconds between the last access of a record and the time when a record can be purged from the registry.
-
delete
Description copied from interface:RegistryDelete the given key. -
containsKey
Description copied from interface:RegistryCheck if something is registered for the key.- Specified by:
containsKeyin interfaceRegistry- Parameters:
key- key to check for
-
put
Description copied from interface:RegistryPut a URI in the registry. -
incrementLong
Description copied from interface:RegistryIncrement the value currently stored in the registry by the amount. This assumes it is an long.If there is not value present in registry then a value will be registered as amount.
- Specified by:
incrementLongin interfaceRegistry- Parameters:
key- the key of the element to incrementamount- the amount to increment- Returns:
- the new value
-
incrementInt
Description copied from interface:RegistryIncrement the value currently stored in the registry by the amount. This assumes it is an integer.If there is not value present in registry then a value will be registered as amount.
- Specified by:
incrementIntin interfaceRegistry- Parameters:
key- the key of the element to incrementamount- th amount to increment- Returns:
- the new value
-
getURI
Description copied from interface:RegistryGet a URI from the registry. -
put
Description copied from interface:RegistryPut a string in the registry. -
getString
Description copied from interface:RegistryGet string from the registry. -
put
Description copied from interface:RegistryPut a number in the registry. -
getNumber
Description copied from interface:RegistryGet a number from the registry. -
opt
Description copied from interface:RegistryGet a value from the registry or return the default if the value is not in the registry. -
put
Description copied from interface:RegistryPut a json object in the registry. -
getJSON
Description copied from interface:RegistryGet a json object from the registry.
-