|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.latencybusters.pdm.PDMDefinitionCache
public class PDMDefinitionCache
A cache to store PDMDefinition
s by their id and version
Method Summary | |
---|---|
void |
clear()
Clears the cache of all definitions and ids |
boolean |
containsKey(int definitionId)
Checks to see if cache contains a definition with the matching definition id (regardless of version) |
boolean |
containsKey(int definitionId,
int versionMajor,
int versionMinor)
Checks to see if cache contains a definition with the matching definition id, and version |
java.util.List<PDMDefinition> |
get(int definitionId)
Gets any matching PDMDefinition (regardless of version)
by its id |
PDMDefinition |
get(int definitionId,
int versionMajor,
int versionMinor)
Gets the matching PDMDefinition including version |
static PDMDefinitionCache |
getInstance()
Used to get the Singleton instance of the cache |
PDMDefinition |
put(PDMDefinition def)
Stores the PDMDefinition in the cache by its id,
major version and minor version, unless the id is 0 |
java.util.List<PDMDefinition> |
remove(int definitionId)
Removes any matching PDMDefinition from the cache
with the corresponding id regardless of version |
PDMDefinition |
remove(int definitionId,
int versionMajor,
int versionMinor)
Removes any matching PDMDefinition from the cache
withthe corresponding id and version |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static PDMDefinitionCache getInstance()
PDMDefinitionCache
public boolean containsKey(int definitionId)
definitionId
- the id of the definition to look up
public boolean containsKey(int definitionId, int versionMajor, int versionMinor)
definitionId
- the id of the definition to look upversionMajor
- the major version number of the definition to look upversionMinor
- the minor version number of the definition to look up
PDMDefinition
public java.util.List<PDMDefinition> get(int definitionId)
PDMDefinition
(regardless of version)
by its id
definitionId
- the id of the definition to look up
PDMDefinition
list of matchespublic PDMDefinition get(int definitionId, int versionMajor, int versionMinor)
PDMDefinition
including version
definitionId
- the id of the definition to look upversionMajor
- the major version number of the definition to look upversionMinor
- the minor version number of the definition to look up
PDMDefinition
public PDMDefinition put(PDMDefinition def)
PDMDefinition
in the cache by its id,
major version and minor version, unless the id is 0
def
- the definition to store
PDMDefinition
or null if it could not be addedpublic java.util.List<PDMDefinition> remove(int definitionId)
PDMDefinition
from the cache
with the corresponding id regardless of version
definitionId
- the id of the definition to remove
PDMDefinition
public PDMDefinition remove(int definitionId, int versionMajor, int versionMinor)
PDMDefinition
from the cache
withthe corresponding id and version
definitionId
- the id of the definition to removeversionMajor
- the major version of the definition to removeversionMinor
- the minor version of the definition to remove
PDMDefinition
that was removed or nullpublic void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |