UM Java API  6.16
com.latencybusters.pdm.PDMDefinitionCache Class Reference

Public Member Functions

boolean containsKey (int definitionId)
 
boolean containsKey (int definitionId, int versionMajor, int versionMinor)
 
List< PDMDefinitionget (int definitionId)
 
PDMDefinition get (int definitionId, int versionMajor, int versionMinor)
 
PDMDefinition put (PDMDefinition def)
 
List< PDMDefinitionremove (int definitionId)
 
PDMDefinition remove (int definitionId, int versionMajor, int versionMinor)
 
void clear ()
 

Static Public Member Functions

static PDMDefinitionCache getInstance ()
 

Detailed Description

A cache to store PDMDefinitions by their id and version

Author
jfugitt

Member Function Documentation

void com.latencybusters.pdm.PDMDefinitionCache.clear ( )

Clears the cache of all definitions and ids

boolean com.latencybusters.pdm.PDMDefinitionCache.containsKey ( int  definitionId)

Checks to see if cache contains a definition with the matching definition id (regardless of version)

Parameters
definitionIdthe id of the definition to look up
Returns
true if the cache contains this definition id

Referenced by com.latencybusters.pdm.PDMDefinitionCache.put().

boolean com.latencybusters.pdm.PDMDefinitionCache.containsKey ( int  definitionId,
int  versionMajor,
int  versionMinor 
)

Checks to see if cache contains a definition with the matching definition id, and version

Parameters
definitionIdthe id of the definition to look up
versionMajorthe major version number of the definition to look up
versionMinorthe minor version number of the definition to look up
Returns
true if the cache contains this PDMDefinition
List<PDMDefinition> com.latencybusters.pdm.PDMDefinitionCache.get ( int  definitionId)

Gets any matching PDMDefinition (regardless of version) by its id

Parameters
definitionIdthe id of the definition to look up
Returns
the PDMDefinition list of matches

Referenced by com.latencybusters.pdm.PDMMessage.getMessageLen(), and com.latencybusters.pdm.PDMMessage.PDMMessage().

PDMDefinition com.latencybusters.pdm.PDMDefinitionCache.get ( int  definitionId,
int  versionMajor,
int  versionMinor 
)

Gets the matching PDMDefinition including version

Parameters
definitionIdthe id of the definition to look up
versionMajorthe major version number of the definition to look up
versionMinorthe minor version number of the definition to look up
Returns
the PDMDefinition
static PDMDefinitionCache com.latencybusters.pdm.PDMDefinitionCache.getInstance ( )
static

Used to get the Singleton instance of the cache

Returns
the instance of the PDMDefinitionCache

Referenced by com.latencybusters.pdm.PDMMessage.PDMMessage().

PDMDefinition com.latencybusters.pdm.PDMDefinitionCache.put ( PDMDefinition  def)

Stores the PDMDefinition in the cache by its id, major version and minor version, unless the id is 0

Parameters
defthe definition to store
Returns
the stored PDMDefinition or null if it could not be added

References com.latencybusters.pdm.PDMDefinitionCache.containsKey().

List<PDMDefinition> com.latencybusters.pdm.PDMDefinitionCache.remove ( int  definitionId)

Removes any matching PDMDefinition from the cache with the corresponding id regardless of version

Parameters
definitionIdthe id of the definition to remove
Returns
the removed PDMDefinition
PDMDefinition com.latencybusters.pdm.PDMDefinitionCache.remove ( int  definitionId,
int  versionMajor,
int  versionMinor 
)

Removes any matching PDMDefinition from the cache withthe corresponding id and version

Parameters
definitionIdthe id of the definition to remove
versionMajorthe major version of the definition to remove
versionMinorthe minor version of the definition to remove
Returns
the PDMDefinition that was removed or null

The documentation for this class was generated from the following file: