PersistentMap provides an interface to a generic store that stores the state of a component of the Rhapsody engine. The component includes communication points. The state persister allows up to 256 different keys, and thus 256 arbitrary values, associated with the provided component to be stored in the PersistentMapStore.

Method Description

void put(byte key, byte[] value)

Associates the specified value with the component in the persistent map store. If the persistent map store contains an existing mapping for this key, the old value is replaced.

Parameters:

  • key - the key state which corresponds to the component.
  • value - the value to be stored in the persistent map store. The maximum size should be 250-byte and if the byte array is longer than this, an exception is thrown.

Exceptions:

  • PersistentMapException - when an error occurs in the put operation.
byte[] get(byte key)

Obtains the value of which the persistent map store maps the specified component identifier. The return value would be null if the map contains no mapping for the provided component and the specified state key.

Parameters:

  • key - the key state which corresponds to the component.

Exceptions:

  • PersistentMapException - when an error occurs in the get operation.

void remove(byte key)

Removes the mapping for this value from this map if present.

Parameters:

  • key - the key state which corresponds to the component.

Exceptions:

  • PersistentMapException - when an error occurs in the remove operation.

Save

Save