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


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

tibasSpace_CompareAndPutAllEx()
Function
Declaration
tibas_status tibasSpace_CompareAndPutAllEx(
tibasSpace            space,
tibasSpaceResultList* resultList,
tibasTupleList        oldValueList,
tibasTupleList        newValueList,
tibasPutOptions       options)
Purpose
Compares the values in a list of old values with the existing values in the space. If the old values are unmodified, replaces the existing tuples with the specified new values. Allows you to set lock and lock wait attributes for the tuple.
Parameters
 
Provide a tibasPutOptions structure that specifies the options for the put.
Remarks
Use the tibasSpace_CompareAndPutAllEx() function to compare the values in the tuples in a space with values stored in an old value list, and if a value is unmodified, replace it with the value in the newValueList. Allows you to set lock and lock wait attributes for the tuples.
tibasSpace_CompareAndPutAllEx() also allows you to specify additional options for the operation, by passing a tibasPutOptions structure in the options parameter. The tibasPutOptions structure is defined as follows:
struct _tibasPutOptions {
    tibas_long    entryTTL;
tibas_long    lockWait;
tibas_boolean lock;
tibas_boolean unlock;
tibas_boolean forget;
};
The put options are defined as follows:
entryTTL Allows you to define the entry TTL for the tuple that is being put.
lockWait Specifies a lock wait time, in milliseconds.
lock Put 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.
See Also
tibasSpace_CompareAndPut(), tibasSpace_CompareAndPutEx(), tibasSpace_CompareAndPutAll()
 

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