TIBCO FTL®
Public Member Functions | List of all members
TIBCO.FTL.ITibMap Interface Reference

Programs can use maps to store key/value pairs in a persistence store. More...

Inheritance diagram for TIBCO.FTL.ITibMap:

Public Member Functions

ITibMapIterator CreateIterator (ITibProperties props)
 Create an iterator over the keys in a map. More...
 
ITibMapIterator CreateIterator (ITibLock tiblock, ITibProperties props)
 Create an iterator over the keys in a map and associate it with a lock. More...
 
IMessage Get (string key)
 Get the value of a key in a map. More...
 
IMessage Get (string key, ITibLock tiblock)
 Get the value of a key in a map as a locked operation. More...
 
void Remove (string key)
 Remove a key/value pair from a map. More...
 
void Remove (string key, ITibLock tiblock)
 Remove a key/value pair from a map as a locked operation. More...
 
void Set (string key, IMessage value)
 Set a key/value pair in a map. More...
 
void Set (string key, IMessage value, ITibLock tiblock)
 Set a key/value pair in a map as a locked operation. More...
 
void Set (String[] keys, IMessage[] values)
 Set multiple key/value pairs in a map. More...
 
void Set (String[] keys, IMessage[] values, ITibLock tiblock)
 Set multiple key/value pairs in a map as a locked operation. More...
 

Detailed Description

Programs can use maps to store key/value pairs in a persistence store.

Prerequisite: Administrators must enable dynamic last-value durables in a persistence store. For more information, see TIBCO FTL Administration.

This interface defines map calls.

To create a map object, see IRealm.CreateMap.

To delete a map from a store, see IRealm.RemoveMap.

Customers do not implement this interface.

Member Function Documentation

ITibMapIterator TIBCO.FTL.ITibMap.CreateIterator ( ITibProperties  props)

Create an iterator over the keys in a map.

The iterator produces every key/value pair in the map.

Parameters
propsReserved for future use.
To ensure forward compatibility, programmers must supply Null.
Returns
A map iterator object.
ITibMapIterator TIBCO.FTL.ITibMap.CreateIterator ( ITibLock  tiblock,
ITibProperties  props 
)

Create an iterator over the keys in a map and associate it with a lock.

The iterator produces every key/value pair in the map.

Before its map operation, this call ensures that the process holds the lock. If the process does not already hold the lock, this call acquires the lock for the process. If it cannot acquire the lock, this call throws an exception, and does not create an iterator.

If the process acquires the lock through this call, it retains the lock after the call completes. The process holds the lock until it explicitly returns it.

Subsequent calls to advance the iterator require that the process hold the lock.

Parameters
tiblockThe iterator uses the lock represented by this lock object.
propsReserved for future use.
To ensure forward compatibility, programmers must supply Null.
Returns
A map iterator object.
IMessage TIBCO.FTL.ITibMap.Get ( string  key)

Get the value of a key in a map.

This call returns a copy of the stored message. Client program code accepts ownership of the message object. Client program code may pass this message to another program thread. Client program code must explicitly destroy the message object.

If the key is not set in the map, this call returns Null.

Parameters
keyThe call gets a value for this key.
Returns
A message.
IMessage TIBCO.FTL.ITibMap.Get ( string  key,
ITibLock  tiblock 
)

Get the value of a key in a map as a locked operation.

This call returns a copy of the stored message. Client program code accepts ownership of the message object. Client program code may pass this message to another program thread. Client program code must explicitly destroy the message object.

Before its map operation, this call ensures that the process holds the lock. If the process does not already hold the lock, this call acquires the lock for the process. If it cannot acquire the lock, this call throws an exception, and does not return the value.

If the process acquires the lock through this call, it retains the lock after the call completes. The process holds the lock until it explicitly returns it.

If the key is not set in the map, this call returns Null.

Parameters
keyThe call gets a value for this key.
tiblockThe call requires the lock represented by this lock object.
Returns
A message.
void TIBCO.FTL.ITibMap.Remove ( string  key)

Remove a key/value pair from a map.

Parameters
keyThe call removes this key.
void TIBCO.FTL.ITibMap.Remove ( string  key,
ITibLock  tiblock 
)

Remove a key/value pair from a map as a locked operation.

Before its map operation, this call ensures that the process holds the lock. If the process does not already hold the lock, this call acquires the lock for the process. If it cannot acquire the lock, the call throws an exception, and does not remove the pair.

If the process acquires the lock through this call, it retains the lock after the call completes. The process holds the lock until it explicitly returns it.

Parameters
keyThe call removes this key.
tiblockThe call requires the lock represented by this lock object.
void TIBCO.FTL.ITibMap.Set ( string  key,
IMessage  value 
)

Set a key/value pair in a map.

If a value has already been set for the key, this call overwrites the existing value.

Parameters
keyThe call sets a value for this key.
valueThe call sets this value for the key.
void TIBCO.FTL.ITibMap.Set ( string  key,
IMessage  value,
ITibLock  tiblock 
)

Set a key/value pair in a map as a locked operation.

Before its map operation, this call ensures that the process holds the lock. If the process does not already hold the lock, this call acquires the lock for the process. If it cannot acquire the lock, this call throws an exception, and does not change the key's value.

If the process acquires the lock through this call, it retains the lock after the call completes. The process holds the lock until it explicitly returns it.

If a value has already been set for the key, this call overwrites the existing value.

Parameters
keyThe call sets a value for this key.
valueThe call sets this value for the key.
tiblockThe call requires the lock represented by this lock object.
void TIBCO.FTL.ITibMap.Set ( String[]  keys,
IMessage[]  values 
)

Set multiple key/value pairs in a map.

If a value has already been set for a key, this call overwrites the existing value.

Parameters
keysThe call sets values for these keys.
valuesThe call sets these values for the corresponding keys.
void TIBCO.FTL.ITibMap.Set ( String[]  keys,
IMessage[]  values,
ITibLock  tiblock 
)

Set multiple key/value pairs in a map as a locked operation.

Before its map operation, this call ensures that the process holds the lock. If the process does not already hold the lock, this call acquires the lock for the process. If it cannot acquire the lock, this call throws an exception, and does not change the key's value.

If the process acquires the lock through this call, it retains the lock after the call completes. The process holds the lock until it explicitly returns it.

If a value has already been set for the key, this call overwrites the existing value.

Parameters
keysThe call sets values for these keys. keys.
valuesThe call sets these values the corresponding keys.
tiblockThe call requires the lock represented by this lock object.