public class DefaultCacheService extends AbstractService implements CacheService
CacheService implementation. Wraps a WeakHashMap| Constructor and Description |
|---|
DefaultCacheService() |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(Object key) |
void |
initialize()
Performs any needed initialization when the service is first loaded.
|
void |
put(Object key,
Object value)
Stores the given object in the cache.
|
getContext, setContext, toStringgetInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetregisterEventHandlersgetIdentifier, logcontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationgetVersiondisposepublic void put(Object key, Object value)
CacheServiceput in interface CacheServicekey - A key.value - A value.public Object get(Object key)
get in interface CacheServicekey - A keypublic void initialize()
Service
NB: This method is not intended to be called directly. It is called by
the service framework itself (specifically by the ServiceHelper)
when initializing the service. It should not be called a second time.
initialize in interface Initializableinitialize in interface ServiceCopyright © 2009–2023 SciJava. All rights reserved.