/** * Closes the output sink by adding last DataFrame with the FIN flag to a queue. * If the output sink is already closed - method does nothing. */ @Override public synchronized void close() { if (!isClosed()) { isLastFrameQueued = true; if (outputQueue.isEmpty()) { writeEmptyFin(); return; } outputQueue.reserveSpace(ZERO_QUEUE_RECORD_SIZE); outputQueue.offer(TERMINATING_QUEUE_RECORD); if (outputQueue.size() == ZERO_QUEUE_RECORD_SIZE && outputQueue.remove(TERMINATING_QUEUE_RECORD)) { writeEmptyFin(); } } }
/** * Closes the output sink by adding last DataFrame with the FIN flag to a queue. * If the output sink is already closed - method does nothing. */ @Override public synchronized void close() { if (!isClosed()) { isLastFrameQueued = true; if (outputQueue.isEmpty()) { writeEmptyFin(); return; } outputQueue.reserveSpace(ZERO_QUEUE_RECORD_SIZE); outputQueue.offer(TERMINATING_QUEUE_RECORD); if (outputQueue.size() == ZERO_QUEUE_RECORD_SIZE && outputQueue.remove(TERMINATING_QUEUE_RECORD)) { writeEmptyFin(); } } }
/** * Closes the output sink by adding last DataFrame with the FIN flag to a queue. * If the output sink is already closed - method does nothing. */ @Override public synchronized void close() { if (!isClosed()) { isLastFrameQueued = true; if (outputQueue.isEmpty()) { writeEmptyFin(); return; } outputQueue.reserveSpace(ZERO_QUEUE_RECORD_SIZE); outputQueue.offer(TERMINATING_QUEUE_RECORD); if (outputQueue.size() == ZERO_QUEUE_RECORD_SIZE && outputQueue.remove(TERMINATING_QUEUE_RECORD)) { writeEmptyFin(); } } }
/** * Closes the output sink by adding last DataFrame with the FIN flag to a queue. * If the output sink is already closed - method does nothing. */ @Override public synchronized void close() { if (!isClosed()) { isLastFrameQueued = true; if (outputQueue.isEmpty()) { writeEmptyFin(); return; } outputQueue.reserveSpace(ZERO_QUEUE_RECORD_SIZE); outputQueue.offer(TERMINATING_QUEUE_RECORD); if (outputQueue.size() == ZERO_QUEUE_RECORD_SIZE && outputQueue.remove(TERMINATING_QUEUE_RECORD)) { writeEmptyFin(); } } }
/** * Closes the output sink by adding last DataFrame with the FIN flag to a queue. * If the output sink is already closed - method does nothing. */ @Override public synchronized void close() { if (!isClosed()) { isLastFrameQueued = true; if (outputQueue.isEmpty()) { writeEmptyFin(); return; } outputQueue.reserveSpace(ZERO_QUEUE_RECORD_SIZE); outputQueue.offer(TERMINATING_QUEUE_RECORD); if (outputQueue.size() == ZERO_QUEUE_RECORD_SIZE && outputQueue.remove(TERMINATING_QUEUE_RECORD)) { writeEmptyFin(); } } }
/** * Closes the output sink by adding last DataFrame with the FIN flag to a queue. * If the output sink is already closed - method does nothing. */ @Override public synchronized void close() { if (!isClosed()) { isLastFrameQueued = true; if (outputQueue.isEmpty()) { writeEmptyFin(); return; } outputQueue.reserveSpace(ZERO_QUEUE_RECORD_SIZE); outputQueue.offer(TERMINATING_QUEUE_RECORD); if (outputQueue.size() == ZERO_QUEUE_RECORD_SIZE && outputQueue.remove(TERMINATING_QUEUE_RECORD)) { writeEmptyFin(); } } }
/** * Closes the output sink by adding last DataFrame with the FIN flag to a queue. * If the output sink is already closed - method does nothing. */ @Override public synchronized void close() { if (!isClosed()) { isLastFrameQueued = true; if (outputQueue.isEmpty()) { writeEmptyFin(); return; } outputQueue.reserveSpace(ZERO_QUEUE_RECORD_SIZE); outputQueue.offer(TERMINATING_QUEUE_RECORD); if (outputQueue.size() == ZERO_QUEUE_RECORD_SIZE && outputQueue.remove(TERMINATING_QUEUE_RECORD)) { writeEmptyFin(); } } }
/** * Closes the output sink by adding last DataFrame with the FIN flag to a queue. * If the output sink is already closed - method does nothing. */ @Override public synchronized void close() { if (!isClosed()) { isLastFrameQueued = true; if (outputQueue.isEmpty()) { writeEmptyFin(); return; } outputQueue.reserveSpace(ZERO_QUEUE_RECORD_SIZE); outputQueue.offer(TERMINATING_QUEUE_RECORD); if (outputQueue.size() == ZERO_QUEUE_RECORD_SIZE && outputQueue.remove(TERMINATING_QUEUE_RECORD)) { writeEmptyFin(); } } }
/** * Closes the output sink by adding last DataFrame with the FIN flag to a queue. * If the output sink is already closed - method does nothing. */ @Override public synchronized void close() { if (!isClosed()) { isLastFrameQueued = true; if (outputQueue.isEmpty()) { writeEmptyFin(); return; } outputQueue.reserveSpace(ZERO_QUEUE_RECORD_SIZE); outputQueue.offer(TERMINATING_QUEUE_RECORD); if (outputQueue.size() == ZERO_QUEUE_RECORD_SIZE && outputQueue.remove(TERMINATING_QUEUE_RECORD)) { writeEmptyFin(); } } }