tibasListenerDef_CreateEx()
Returns a new ListenerDef instance specifying additional parameters.
Declaration
tibas_status tibasListenerDef_CreateEx (tibasListenerDef* listenerDef, tibas_timeScope timeScope, tibas_distributionScope distributionScope)
Parameters
Parameter | Description |
---|---|
listenerDef | The new instance of ListenerDef returned by the function. |
timeScope | Specifies the time scope for the ListenerDef. The time scope can be TIBAS_TIME_SCOPE_SNAPSHOT, TIBAS_TIME_SCOPE_NEW, TIBAS_TIME_SCOPE_NEW_EVENTS, or TIBAS_TIME_SCOPE_ALL. |
distributionScope | The distribution scope to be set in the returned ListenerDef. |
Remarks
Use the tibasListenerDef_CreateEx() function to create a listenerDef object and directly set the attributes for the listenerDef.
To activate the listener, call the tibasMetaspace_Listen() function or the tibasSpace_Listen() and specify the listenerDef object that you have created with tibasListenerDef_Create() or tibasListenerDefCreateEx().
The timeScope parameter specifies the time scope, which can be one of the following:
- TIBAS_TIME_SCOPE_ALL
- The listener starts with all the tuples currently in the space at creation time (which will be presented as an initial set of PUT events) and then is continuously updated according to changes in the space.
- TIBAS_TIME_SCOPE_SNAPSHOT
- The listener contains only PUT events corresponding to the tuples stored in the space at creation time.
- TIBAS_TIME_SCOPE_NEW
- The listener starts empty and is updated only with events related to new or updated tuples in the space.
- TIBAS_TIME_SCOPE_NEW_EVENTS
- (the default setting) The listener starts empty and is updated with all events that occur in the space after creation time.
The distributionScope parameter specifies the distribution scope for the listener, which can be one of the following:
- TIBAS_DISTRIBUTION_SCOPE_ALL
- (default setting) The listener listens to events related to all tuples in the space.
- TIBAS_DISTRIBUTION_SCOPE_SEEDED
- The listener listens only to events associated with the tuples in the space that are seeded by this member.
Copyright © Cloud Software Group, Inc. All rights reserved.