Class RecordPipeBufferedWrapper
java.lang.Object
com.kingsrook.qqq.backend.core.actions.reporting.RecordPipe
com.kingsrook.qqq.backend.core.actions.reporting.BufferedRecordPipe
com.kingsrook.qqq.backend.core.actions.reporting.RecordPipeBufferedWrapper
Subclass of BufferedRecordPipe, which ultimately sends records down to an
original RecordPipe.
Meant to be used where: someone passed in a RecordPipe (so they have a reference
to it, and they are waiting to read from it), but the producer knows that
it will be better to buffer the records, so they want to use a buffered pipe
(but they still need the records to end up in the original pipe - thus -
it gets wrapped by an object of this class).
-
Field Summary
Fields inherited from class com.kingsrook.qqq.backend.core.actions.reporting.BufferedRecordPipe
buffer -
Constructor Summary
ConstructorsConstructorDescriptionRecordPipeBufferedWrapper(RecordPipe wrappedPipe) Constructor - uses default buffer sizeRecordPipeBufferedWrapper(Integer bufferSize, RecordPipe wrappedPipe) Constructor - customize buffer size. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidflush()when it's time to actually add records into the pipe (flushing from buffer int pipe), actually add them into the wrapped pipe!Methods inherited from class com.kingsrook.qqq.backend.core.actions.reporting.BufferedRecordPipe
addRecord, addRecords, finalFlushMethods inherited from class com.kingsrook.qqq.backend.core.actions.reporting.RecordPipe
consumeAvailableRecords, countAvailableRecords, getCapacity, getTotalRecordCount, setPostRecordActions, terminate
-
Constructor Details
-
RecordPipeBufferedWrapper
Constructor - uses default buffer size -
RecordPipeBufferedWrapper
Constructor - customize buffer size.
-
-
Method Details
-
flush
when it's time to actually add records into the pipe (flushing from buffer int pipe), actually add them into the wrapped pipe!- Overrides:
flushin classBufferedRecordPipe- Throws:
QException
-
getWrappedPipe
-