tibasSpace_CompareAndTakeEx()
Looks for a tuple containing a specified value, and if it is found, takes the tuple value. Allows you to set lock and lock wait attributes for the tuples.
Declaration
tibas_status tibasSpace_CompareAndTakeEx( tibasSpace space, tibasTuple* value, tibasTuple oldValue, tibasTakeOptions options)
Remarks
Use the tibasSpace_CompareAndTakeEx() function to look for a tuple containing a specified value, and if it is found, take the tuple with the specified value.
tibasSpace_CompareAndTakeEx() also allows you to specify additional options for the operation, by passing a tibasTakeOptions structure in the options parameter. The tibasTakeOptions structure is defined as follows:
struct _tibasTakeOptions { tibas_long lockWait; tibas_boolean lock; tibas_boolean unlock; tibas_boolean forget; const char* filter; };
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.
- filter
- Specify a filter string so that the operations are performed only on the data set that matches with the specified filter.
Copyright © Cloud Software Group, Inc. All rights reserved.