@Override public void shutdown() { Pipe.publishEOF(columnPipeOutput); }
@Override public void shutdown() { //if file contains eof it is never sent to pipe so we end with this one. Pipe.publishEOF(target); } private boolean processAvailData(TapeReadStage tapeReadStage) {
@Override public void shutdown() { Pipe.publishEOF(colOutput); }
@Override public void shutdown() { Pipe.publishEOF(output); }
@Override public void shutdown() { Pipe.publishEOF(output); logger.trace("server reader has shut down"); }
@Override public void shutdown() { int i = outgoingPipes.length; while (--i>=0) { if (null!=outgoingPipes[i] && Pipe.isInit(outgoingPipes[i])) { Pipe.publishEOF(outgoingPipes[i]); } } }
@Override public void shutdown() { Pipe.publishEOF(output); }
@Override public void shutdown() { int i = output.length; while (--i>=0) { if (null!=output[i] && Pipe.isInit(output[i])) { Pipe.publishEOF(output[i]); } } }
/** * Publish an EOF value to all the outgoing pipes * * @param pipe Pipe[] targets */ public static void publishEOF(Pipe<?>[] pipe) { int i = pipe.length; while (--i>=0) { if (null != pipe[i] && Pipe.isInit(pipe[i])) { publishEOF(pipe[i]); } } }
/** * Publish an EOF value to all the outgoing pipes * * @param pipe Pipe[] targets */ public static void publishEOF(Pipe<?>[] pipe) { int i = pipe.length; while (--i>=0) { if (null != pipe[i] && Pipe.isInit(pipe[i])) { publishEOF(pipe[i]); } } }
/** * Publish an EOF value to all the outgoing pipes * * @param pipe Pipe[] targets */ public static void publishEOF(Pipe<?>[] pipe) { int i = pipe.length; while (--i>=0) { if (null != pipe[i] && Pipe.isInit(pipe[i])) { publishEOF(pipe[i]); } } }
@Override public void shutdown() { if (null!=output && Pipe.isInit(output)) { Pipe.publishEOF(output); } if (null != fileChannel) { try { fileChannel.close(); fileChannel=null;//do not more work } catch (IOException e) { throw new RuntimeException(e); } } }
boolean sentEOFPrivate() { boolean ok = false; if (null!=publishPrivateTopics) { int c = publishPrivateTopics.count(); while (--c>=0) { Pipe.publishEOF(publishPrivateTopics.getPipe(c)); ok = true; } } return ok; }
@Deprecated public static void writeEOF(Pipe ring) {//TODO:M propose a way to remove the need for this poison pill and the blocking use of this call on close() long lastCheckedValue = tailPosition(ring); while (null==Pipe.slab(ring) || lastCheckedValue < headPosition(ring)-(1 + ring.slabMask - Pipe.EOF_SIZE)) { Pipe.spinWork(ring); lastCheckedValue = Pipe.tailPosition(ring); } Pipe.publishEOF(ring); }
@Deprecated public static void writeEOF(Pipe ring) {//TODO:M propose a way to remove the need for this poison pill and the blocking use of this call on close() long lastCheckedValue = tailPosition(ring); while (null==Pipe.slab(ring) || lastCheckedValue < headPosition(ring)-(1 + ring.slabMask - Pipe.EOF_SIZE)) { Pipe.spinWork(ring); lastCheckedValue = Pipe.tailPosition(ring); } Pipe.publishEOF(ring); }
@Deprecated public static void writeEOF(Pipe ring) {//TODO:M propose a way to remove the need for this poison pill and the blocking use of this call on close() long lastCheckedValue = tailPosition(ring); while (null==Pipe.slab(ring) || lastCheckedValue < headPosition(ring)-(1 + ring.slabMask - Pipe.EOF_SIZE)) { Pipe.spinWork(ring); lastCheckedValue = Pipe.tailPosition(ring); } Pipe.publishEOF(ring); }
@Override public void close() { long lastCheckedValue = tailPosition(pipe); while (null==Pipe.slab(pipe) || lastCheckedValue < headPosition(pipe)-(1 + pipe.slabMask - Pipe.EOF_SIZE)) { Pipe.spinWork(pipe); lastCheckedValue = Pipe.tailPosition(pipe); } Pipe.publishEOF(pipe); } }
@Override public void close() { long lastCheckedValue = tailPosition(pipe); while (null==Pipe.slab(pipe) || lastCheckedValue < headPosition(pipe)-(1 + pipe.slabMask - Pipe.EOF_SIZE)) { Pipe.spinWork(pipe); lastCheckedValue = Pipe.tailPosition(pipe); } Pipe.publishEOF(pipe); } }
@Override public void close() { long lastCheckedValue = tailPosition(pipe); while (null==Pipe.slab(pipe) || lastCheckedValue < headPosition(pipe)-(1 + pipe.slabMask - Pipe.EOF_SIZE)) { Pipe.spinWork(pipe); lastCheckedValue = Pipe.tailPosition(pipe); } Pipe.publishEOF(pipe); } }
@Override public void run() { while (Pipe.hasContentToRead(input) && Pipe.hasRoomForWrite(output)) { int msgIn = Pipe.takeMsgIdx(input); if (msgIn<0) { Pipe.publishEOF(output); requestShutdown(); return; } int msgSize = Pipe.addMsgIdx(output, msgIn);//WARNING: using the same id as we just took in, inputType.convertToDecimal(blockSize, input, output); Pipe.confirmLowLevelWrite(output, msgSize); Pipe.publishWrites(output); Pipe.confirmLowLevelRead(input, Pipe.sizeOf(input, msgIn)); Pipe.releaseReadLock(input); } }