UM Java API 6.17.1

- Main Page
- Related Pages
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | List of all members
com.latencybusters.pdm.PDMDefinitionCache Class Reference

## Public Member Functions
boolean | containsKey (int definitionId)
boolean | containsKey (int definitionId, int versionMajor, int versionMinor)
List< PDMDefinition > | get (int definitionId)
PDMDefinition | get (int definitionId, int versionMajor, int versionMinor)
PDMDefinition | put (PDMDefinition def)
List< PDMDefinition > | remove (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

  definitionId | the 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

  definitionId | the id of the definition to look up
  versionMajor | the major version number of the definition to look up
  versionMinor | the 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

  definitionId | the 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

  definitionId | the id of the definition to look up
  versionMajor | the major version number of the definition to look up
  versionMinor | the 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

  def | the 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

  definitionId | the 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

  definitionId | the id of the definition to remove
  versionMajor | the major version of the definition to remove
  versionMinor | the 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:

- PDMDefinitionCache.java