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, toString
getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get
registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
public void put(Object key, Object value)
CacheService
put
in interface CacheService
key
- A key.value
- A value.public Object get(Object key)
get
in interface CacheService
key
- 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 Initializable
initialize
in interface Service
Copyright © 2015–2022 SciJava. All rights reserved.