tibasEventBrowserDef_CreateEx()

Returns a new EventBrowserDef instance.

Declaration

tibas_status tibasEventBrowserDef_CreateEx
(tibasEventBrowserDef*      eventBrowserDef,
tibas_int                   timeout,
tibas_timeScope             timeScope,
tibas_distributionScope     distributionScope)

Parameters

Parameter Description
eventBrowserDef The new instance of the event browser definition object returned by the function.
timeout The value of the timeout to be set in the returned EventBrowserDef.
timeScope The time scope values for the event browser.

The time scope can be one of the following:

  • TIBAS_TIME_SCOPE_SNAPSHOT
  • TIBAS_TIME_SCOPE_NEW
  • TIBAS_TIME_SCOPE_NEW_EVENTS
  • TIBAS_TIME_SCOPE_ALL (the default)
distributionScope The distribution scope to be set in the returned EventBrowserDef.

Remarks

Use the tibasEventBrowserDef_CreateEx() function to create an eventBrowserDef object that defines the attributes of an event browser and directly set the attributes.

The timeout is the amount of time for which an event browser'stibasEventBrowser_Next() function can block while waiting for something new in the space to execute a tibasEventBrowser_Next() on. If there is still nothing new for the browser to perform a next() operation on at the end of the timeout, thetibasEventBrowser_Next() function returns null.

You can specify one of the following with the timeout parameter:

The timeout value in milliseconds.

TIBAS_NO_WAIT
Specifies that the browser will not wait before executing another tibasEventBrowser_Next() operation.
Note: The browser’s timeout value is ignored when the browser’s time scope is set to TIBAS_TIME_SCOPE_SNAPSHOT. In this case, any invocation of the tibasBrowser_Next() function on the browser once all of the tuples in the snapshot have been iterated through immediately returns NULL.

The timescope parameter specifies the time scope for the event browser, and can have one of one of the following values:

TIBAS_TIME_SCOPE_ALL
The event browser starts with all the events 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 event browser contains only PUT events corresponding to the tuples stored in the space at creation time.
TIBAS_TIME_SCOPE_NEW
The event browser starts empty and is updated only with events related to new or updated tuples in the space.
TIBAS_TIME_SCOPE_NEW_EVENTS
The event browser starts empty and is updated with all events that occur in the space after creation time.

The distribution scope can be:

TIBAS_DISTRIBUTION_SCOPE_ALL
(default setting) The event browser browses events related to all tuples in the space.
TIBAS_DISTRIBUTION_SCOPE_SEEDED
The event browser browses only events associated with the tuples in the space that are seeded by this member.

After you create the eventBrowserDef, you pass it to the tibasMetaspace_BrowseEvents() function or the tibasSpace_BrowseEvents() function to enable the browser.