Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This SRP FrameWorks utility service is a general purpose error tracking and reporting utility. Unlike OpenInsight error routines, Error_Services does not interfere with normal operations even if a previous error condition was set. The developer is given the right (and responsibility) to make these decisionsdesigned to store small or large amounts of data in memory for quick retrieval. A very common use of Memory_Services is to use this to store the values of other services as they are called and their logic produces a result. The beginning of each service can then first check to see if a value already exists for this service before going through the expense of running the service logic again. If the data being stored in Memory_Services needs to be refreshed after a short amount of time, the GetValue service can specify when this should expire.

Services

ServiceDescription
KeyExists

Usage:
Memory_Services('KeyExists', KeyID)

Comments:
Returns a True or False depending on whether the Key ID exists.

Returns:
True if Key ID already exists in the SRP Hash Table, False if it does not exist.

GetValue

Usage:
Memory_Services('GetValue', KeyID, NotExpired, ExpirationDuration)

Comments:
Returns the value pair stored in the SRP Hash Table for the current Key ID. If the NotExpired flag is set, the ExpirationDuration will be used to compare against the last time marker set for the current data.

Returns:
The value associated to the Key ID.

SetValue

Usage:
Memory_Services('SetValue', KeyID, Value)

Comments:
Updates the value pair stored in the SRP Hash Table for the current Key ID.

Returns:
N/A

RemoveKey

Usage:
Memory_Services('RemoveKey', KeyID)

Comments:
Removes the Key ID, and its value pair, from the SRP Hash Table.

Returns:
N/A

CreateHashTable

Usage:
Memory_Services('CreateHashTable')

Comments:
Creates the SRP Hash Table that the Memory_Services module will use to manage various Key ID and Value pairs. A check will first be made to see if the handle to the Hash Table already exists. If so then it will be released and a new Hash Table will be created.

Returns:
N/A

ReleaseHashTable

Usage:
Memory_Services('ReleaseHashTable')

Comments:
Releases the SRP Hash Table handle.

Returns:
N/A

GetHandle

Usage:
Memory_Services('GetHandle')

Comments:
Returns the handle to the SRP Hash Table used by Memory_Services.

Returns:
N/A

...