Once Input Adapter

Overview

The Once input adapter is an embedded adapter that starts up and sends one tuple as output. It does nothing else during the lifetime of its container unless the adapter instance is restarted. Its purpose is to ensure that something happens once and only once when the container for an application starts in StreamBase Server. This adapter is designed to trigger the portion of the application that performs the initialization of an input stream, and it is useful for sequencing start and restart activities for an application.

Th output schema has a single timestamp field.

It is possible for the output tuple from another input adapter to occur before the output of the Once input adapter.

Ports

An instance of the Once adapter has a single output port.

Properties

General Tab

The Once adapter has the following properties on the General tab in its Properties View in StreamBase Studio:

Property Data Type Description
Name string Specify a unique name for this adapter instance.
Adapter Name read-only field The formal name of the adapter.
Class read-only field The fully qualified class name that implements the functionality of the adapter. Use this class name when loading the adapter in StreamSQL programs with the APPLY JAVA statement.
Start with application Checkbox If enabled, this adapter instance starts as part of the containing StreamBase Server instance. The default and recommended setting is enabled.
Enable Error Output Port Checkbox Check this box to add an Error Port to this adapter instance. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports and Error Streams in the Authoring Guide to learn about Error Ports.
Description string Optional. Enter text that describes the purpose of this adapter instance in your application. Text entered in this field appears in the tooltip popup for the adapter's component in the EventFlow diagram.

Adapter Settings Tab

The Once Adapter has one setting, which is the output field name. By default, the field name is time.

This setting is a string name of the one field that makes up the schema of the output tuple. The field is of type timestamp, and contains an absolute timestamp value. The field specifies the system time when the adapter sends the tuple.

Standard Tabs

The Once Adapter has the following standard tabs in its Properties View in StreamBase Studio:

Typechecking and Error Handling

Typechecking detects a value for the output that is null or unspecified.