tibasSpace_TakeEx()

Returns and atomically removes from the space the tuple (if one exists) whose tuple key fields match the key fields of the tuple provided. Allows you to specify a lock wait value, a lock and unlock value, and a forget value.

Declaration

tibas_status tibasSpace_TakeEx(
    tibasSpace space,
    tibasTuple* value,
    tibasTuple key,
    tibasTakeOptions options)

Parameters

Parameter Description
space The TIBCO ActiveSpaces entity on which the function is invoked.
value Returns a tuple containing the tuple.
key A tuple containing a key to locate the tuple.
options Provide a tibasTakeOptions structure that specifies the options for the take.

Remarks

Use the tibasSpace_TakeEx() function to return and atomically remove from the space the tuple (if one exists) whose tuple key fields match the key fields of the tuple provided. Allows you to specify a lock wait value, a lock and unlock value, and a forget value.

The options parameter provides a tibasTakeOptions structure that specifies the options for the take. The tibasTakeOptions structure is defined as follows:

struct _tibasTakeOptions {
    tibas_long lockWait;
    tibas_boolean lock;
    tibas_boolean unlock;
    tibas_boolean forget;
};

The take options are defined as follows:

lockWait
Specifies a lock wait time, in milliseconds.
lock
Take the data and lock the tuple.
unlock
Unlock the tuple. Only the thread or process that locked the tuple can unlock it.

Lock and unlock are mutually exclusive. If you use one of these, code NULL for the other.

forget
Specify this option if you want the system to forget the return. This is useful if you do not need the tuple.