TIBCO FTL®
|
Programs can use maps to store key/value pairs in a persistence store. More...
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... | |
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.
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.
props | Reserved for future use. To ensure forward compatibility, programmers must supply Null . |
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.
tiblock | The iterator uses the lock represented by this lock object. |
props | Reserved for future use. To ensure forward compatibility, programmers must supply Null . |
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
.
key | The call gets a value for this key. |
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
.
key | The call gets a value for this key. |
tiblock | The call requires the lock represented by this lock object. |
void TIBCO.FTL.ITibMap.Remove | ( | string | key | ) |
Remove a key/value pair from a map.
key | The 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.
key | The call removes this key. |
tiblock | The 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.
key | The call sets a value for this key. |
value | The call sets this value for the key. |
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.
key | The call sets a value for this key. |
value | The call sets this value for the key. |
tiblock | The 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.
keys | The call sets values for these keys. |
values | The call sets these values for the corresponding keys. |
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.
keys | The call sets values for these keys. keys. |
values | The call sets these values the corresponding keys. |
tiblock | The call requires the lock represented by this lock object. |