public interface RecordOutput extends PhysicalOutputPort, RecordSettable, GenericPushable, TokenAppendable
ScalarOutputField
fields, one for each field of the record, indexed both
by name and position, as determined by the schema of the output's RecordTokenType
.
Publishing records to the flow is a two-step process. First, the values of all fields
must be set. Fields provide methods appropriate to their token type for setting the
value. Finally, the record is published by calling push()
on the
RecordOutput
. The values of the fields will be gathered to construct the
record value to push. Any fields which were not set will assume a null value.
All fields will become null valued again after the push()
.
Modifier and Type | Method and Description |
---|---|
void |
detach()
Immediately terminates the data flow generated by the output port.
|
void |
flush()
Forces all previously pushed tokens to be made available to consumers of
the output's flow.
|
ScalarOutputField |
getField(int index)
Gets the output field at the given position.
|
ScalarOutputField |
getField(String fieldName)
Gets the output field with the given name.
|
ScalarOutputField[] |
getFields()
Gets all output fields of the record port.
|
OutputStatistics |
getStats()
Retrieves the run-time statistics gathered for this input.
|
RecordTokenType |
getType()
Gets the type of tokens in the underlying flow.
|
void |
push()
Appends a record onto the output's flow, using the current values
of all fields to construct the record token.
|
void |
push(TokenValued value)
Appends the given token value onto the output's flow.
|
void |
push(TokenValued value,
long n)
Appends the given token value onto the output's flow multiple times.
|
void |
pushEndOfData()
Signals completion of the data flow generated by the output port.
|
void |
pushNull()
Appends a null valued token onto the output's flow.
|
void |
pushNull(long n)
Appends multiple null valued tokens onto the output's flow.
|
int |
size()
Gets the number of of record fields contained within the port.
|
addListener
isAttached
set, setNull, setZero
append, append, append, append
RecordTokenType getType()
PhysicalPort
getType
in interface PhysicalPort
getType
in interface RecordSettable
getType
in interface RecordTyped
getType
in interface TokenTyped
int size()
size
in interface RecordSettable
ScalarOutputField[] getFields()
getFields
in interface RecordSettable
ScalarOutputField getField(String fieldName)
getField
in interface RecordSettable
fieldName
- name of the fieldScalarOutputField getField(int index)
getField
in interface RecordSettable
index
- zero-based index into the field listvoid push()
push()
, the field
will be null valued.push
in interface GenericPushable
void detach()
pushEndOfData()
, there are no guarantees on delivery
of previously published tokens.detach
in interface PhysicalPort
void pushEndOfData()
void push(TokenValued value)
value
- the token value to pushvoid push(TokenValued value, long n)
value
- the token value to pushn
- the number of copies to pushvoid pushNull()
null
Java reference.void pushNull(long n)
n
- the number of null values to pushpushNull()
void flush()
OutputStatistics getStats()
getStats
in interface PhysicalPort
PortStats
gathered during execution or
null
if the configuration did not specify
collecting statisticsCopyright © 2020 Actian Corporation. All rights reserved.