public interface RecordSink extends DataVisitor, SubscriptionVisitor
DataVisitor
and SubscriptionVisitor
.Modifier and Type | Field and Description |
---|---|
static RecordSink |
VOID
Record sink that just ignores all records.
|
Modifier and Type | Method and Description |
---|---|
void |
append(RecordCursor cursor)
Adds a record to this sink from the specified
RecordCursor . |
void |
flush()
Signal that it is safe to flush
appended records to disk,
e.g. |
boolean |
hasCapacity()
Returns whether sink has capacity to efficiently
append next record. |
void |
visitIntField(DataIntField field,
int value)
Deprecated.
Use
append(RecordCursor) . |
void |
visitObjField(DataObjField field,
Object value)
Deprecated.
Use
append(RecordCursor) . |
void |
visitRecord(DataRecord record,
int cipher,
String symbol)
Deprecated.
Use
append(RecordCursor) . |
void |
visitRecord(DataRecord record,
int cipher,
String symbol,
long time)
Deprecated.
Use
append(RecordCursor) . |
static final RecordSink VOID
boolean hasCapacity()
append
next record.
This method may be used to advise RecordProvider
that it is desirable
to stop current batch and keep remaining records. However,
record provider is not obliged to adhere to this method contract.
NOTE: sink must process all records that are passed to it
via append
method calls no matter whether it
has capacity to do it efficiently.
hasCapacity
in interface DataVisitor
hasCapacity
in interface SubscriptionVisitor
void append(RecordCursor cursor)
RecordCursor
.void flush()
appended
records to disk,
e.g. no locks are currently held.void visitRecord(DataRecord record, int cipher, String symbol)
append(RecordCursor)
.visitRecord
in interface DataVisitor
void visitRecord(DataRecord record, int cipher, String symbol, long time)
append(RecordCursor)
.visitRecord
in interface SubscriptionVisitor
void visitIntField(DataIntField field, int value)
append(RecordCursor)
.visitIntField
in interface DataVisitor
void visitObjField(DataObjField field, Object value)
append(RecordCursor)
.visitObjField
in interface DataVisitor
Copyright © 2002–2025 Devexperts LLC. All rights reserved.