Class BufferedRecordPipe
java.lang.Object
com.kingsrook.qqq.backend.core.actions.reporting.RecordPipe
com.kingsrook.qqq.backend.core.actions.reporting.BufferedRecordPipe
- Direct Known Subclasses:
RecordPipeBufferedWrapper
Subclass of RecordPipe, which uses a buffer in the addRecord method, to avoid
sending single-records at a time through postRecordActions and to consumers.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor - uses default buffer sizeBufferedRecordPipe(Integer bufferSize) Constructor - customize buffer size. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a record to the pipe.voidaddRecords(List<QRecord> records) Add a list of records to the pipe.voidprotected voidflush()Methods inherited from class com.kingsrook.qqq.backend.core.actions.reporting.RecordPipe
consumeAvailableRecords, countAvailableRecords, getCapacity, getTotalRecordCount, setPostRecordActions, terminate
-
Field Details
-
buffer
-
-
Constructor Details
-
BufferedRecordPipe
public BufferedRecordPipe()Constructor - uses default buffer size -
BufferedRecordPipe
Constructor - customize buffer size.
-
-
Method Details
-
addRecord
Description copied from class:RecordPipeAdd a record to the pipe. Will block if the pipe is full. Will noop if pipe is terminated.- Overrides:
addRecordin classRecordPipe- Throws:
QException
-
addRecords
Description copied from class:RecordPipeAdd a list of records to the pipe. Will block if the pipe is full. Will noop if pipe is terminated.- Overrides:
addRecordsin classRecordPipe- Throws:
QException
-
flush
- Throws:
QException
-
finalFlush
- Throws:
QException
-