use of com.alibaba.datax.core.transport.record.TerminateRecord in project DataX by alibaba.
the class BufferedRecordExchanger method getFromReader.
@Override
public Record getFromReader() {
if (shutdown) {
throw DataXException.asDataXException(CommonErrorCode.SHUT_DOWN_TASK, "");
}
boolean isEmpty = (this.bufferIndex >= this.buffer.size());
if (isEmpty) {
receive();
}
Record record = this.buffer.get(this.bufferIndex++);
if (record instanceof TerminateRecord) {
record = null;
}
return record;
}
use of com.alibaba.datax.core.transport.record.TerminateRecord in project DataX by alibaba.
the class BufferedRecordTransformerExchanger method getFromReader.
@Override
public Record getFromReader() {
if (shutdown) {
throw DataXException.asDataXException(CommonErrorCode.SHUT_DOWN_TASK, "");
}
boolean isEmpty = (this.bufferIndex >= this.buffer.size());
if (isEmpty) {
receive();
}
Record record = this.buffer.get(this.bufferIndex++);
if (record instanceof TerminateRecord) {
record = null;
}
return record;
}
Aggregations