|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.ebi.jmzidml.xml.jaxb.unmarshaller.cache.AdapterObjectCache
public class AdapterObjectCache
Java in memory HashMap based Object cache implementation of the MzIdentMLObjectCache. Note that this implementation makes use of the MzIdentMLElement types to control which Objects are cached and which are ignored.
Constructor Summary | |
---|---|
AdapterObjectCache()
|
Method Summary | ||
---|---|---|
|
getCachedObject(String id,
Class<T> cls)
Retrieve a MzIdentMLObject from the object cache. |
|
|
getEntries(Class<T> clazz)
|
|
|
hasEntry(Class<T> clazz)
|
|
void |
putInCache(IdentifiableMzIdentMLObject element)
Convenience method to store Objects that implement the Identifiable interface. |
|
void |
putInCache(String id,
MzIdentMLObject object)
Stores the Object in a in-memory Map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AdapterObjectCache()
Method Detail |
---|
public void putInCache(String id, MzIdentMLObject object)
putInCache
in interface MzIdentMLObjectCache
id
- the ID under which to store the Object.object
- the MzIdentMLObject to store.MzIdentMLElement
public void putInCache(IdentifiableMzIdentMLObject element)
putInCache
in interface MzIdentMLObjectCache
element
- the Identifiable to store in the cache.public <T extends MzIdentMLObject> T getCachedObject(String id, Class<T> cls)
getCachedObject
in interface MzIdentMLObjectCache
id
- the ID of the object to retrieve.cls
- the class of the object to retrieve.
public <T extends MzIdentMLObject> boolean hasEntry(Class<T> clazz)
hasEntry
in interface MzIdentMLObjectCache
public <T extends MzIdentMLObject> List<T> getEntries(Class<T> clazz)
getEntries
in interface MzIdentMLObjectCache
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |