Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Space : Space Operations and Options Initialization Operations : tibasSpace_CompareAndTakeAllEx()

tibasSpace_CompareAndTakeAllEx()
Function
Declaration
tibas_status tibasSpace_CompareAndTakeAllEx(
tibasSpace space,
tibasSpaceResultList* resultList,
tibasTupleList oldValueList,
tibasTakeOptions options)
Purpose
Compares values in a list of specified values with the values in the existing tuples. If value matches are found, takes the specified tuples. Allows you to set lock and lock wait attributes for the tuples.
Parameters
 
Provide a tibasTakeOptions structure that specifies the options for the take.
Remarks
Use the tibasSpace_CompareAndTakeAllEx() function to look for tuples containing specified values, and if value matches are found, take the tuple values. If there is no mismatch, the function returns the same value as specified in the list of old values.
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;
};
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.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved