UM .NET API 6.17.1

- Main Page
- Related Pages
- Packages
- Classes

- Class List
- Class Hierarchy
- Class Members

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

A cache to store PDMDefinitions by their id and version. More...

## Public Member Functions
virtual bool | containsKey (int definitionId)
| Checks to see if cache contains a definition with the matching definition id (regardless of version) More...
virtual bool | containsKey (int definitionId, int versionMajor, int versionMinor)
| Checks to see if cache contains a definition with the matching definition id, and version. More...
List< PDMDefinition > | get (int definitionId)
| Gets any matching PDMDefinition (regardless of version) by its id. More...
virtual PDMDefinition | get (int definitionId, int versionMajor, int versionMinor)
| Gets the matching PDMDefinition including version. More...
virtual PDMDefinition | put (PDMDefinition def)
| Stores the PDMDefinition in the cache by its id, major version and minor version, unless the id is 0. More...
List< PDMDefinition > | remove (int definitionId)
| Removes any matching PDMDefinition from the cache with the corresponding id regardless of version. More...
virtual PDMDefinition | remove (int definitionId, int versionMajor, int versionMinor)
| Removes any matching PDMDefinition from the cache withthe corresponding id and version. More...
virtual void | clear ()
| Clears the cache of all definitions and ids.

## Public Attributes
readonly object | cacheLock = new object()

## Properties
static PDMDefinitionCache | Instance`[get]`
| Used to get the Singleton instance of the cache. More...

## Detailed Description

A cache to store PDMDefinitions by their id and version.

## Member Function Documentation

virtual bool com.latencybusters.pdm.PDMDefinitionCache.containsKey | ( | int | definitionId | ) |
| virtual

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

References com.latencybusters.pdm.PDMDefinition.Id.

virtual bool com.latencybusters.pdm.PDMDefinitionCache.containsKey | ( | int | definitionId,
|  | int | versionMajor,
|  | int | versionMinor
| ) |  |
| virtual

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

References com.latencybusters.pdm.PDMDefinition.Id, com.latencybusters.pdm.PDMDefinition.MsgVersMajor, and com.latencybusters.pdm.PDMDefinition.MsgVersMinor.

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

References com.latencybusters.pdm.PDMDefinition.Id.

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

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

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

References com.latencybusters.pdm.PDMDefinition.Id, com.latencybusters.pdm.PDMDefinition.MsgVersMajor, and com.latencybusters.pdm.PDMDefinition.MsgVersMinor.

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

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.PDMDefinition.Id, com.latencybusters.pdm.PDMDefinition.MsgVersMajor, and com.latencybusters.pdm.PDMDefinition.MsgVersMinor.

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

virtual PDMDefinition com.latencybusters.pdm.PDMDefinitionCache.remove | ( | int | definitionId,
|  | int | versionMajor,
|  | int | versionMinor
| ) |  |
| virtual

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

## Property Documentation

PDMDefinitionCache com.latencybusters.pdm.PDMDefinitionCache.Instance
| static get

Used to get the Singleton instance of the cache.

Values: the PDMDefinitionCache instance

Returns
  the instance of the PDMDefinitionCache

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

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

- PDMDefinitionCache.cs