/** * Gets the index of a message in the pipe * @param pipe pipe to check * @return message index */ public static <S extends MessageSchema<S>> int takeMsgIdx(final Pipe<S> pipe) { assert(PipeMonitor.monitor(pipe, pipe.slabRingTail.workingTailPos.value, Pipe.bytesReadBase(pipe) )); return pipe.lastMsgIdx = readIntValue(pipe.slabRing, pipe.slabMask, pipe.slabRingTail.workingTailPos.value++); }
/** * Gets the index of a message in the pipe * @param pipe pipe to check * @return message index */ public static <S extends MessageSchema<S>> int takeMsgIdx(Pipe<S> pipe) { assert(PipeMonitor.monitor(pipe, pipe.slabRingTail.workingTailPos.value, Pipe.bytesReadBase(pipe) )); return pipe.lastMsgIdx = readValue(pipe.slabRing, pipe.slabMask, pipe.slabRingTail.workingTailPos.value++); }
/** * Gets the index of a message in the pipe * @param pipe pipe to check * @return message index */ public static <S extends MessageSchema<S>> int takeMsgIdx(final Pipe<S> pipe) { assert(PipeMonitor.monitor(pipe, pipe.slabRingTail.workingTailPos.value, Pipe.bytesReadBase(pipe) )); return pipe.lastMsgIdx = readIntValue(pipe.slabRing, pipe.slabMask, pipe.slabRingTail.workingTailPos.value++); }
public static <S extends MessageSchema<S>> boolean tryReadFragment(Pipe<S> pipe) { assert( (!PipeReader.hasContentToRead(pipe)) || PipeMonitor.monitor(pipe, pipe.ringWalker.nextWorkingTail, Pipe.bytesReadBase(pipe) ) ); assert(pipe.usingHighLevelAPI); assert(Pipe.singleThreadPerPipeRead(pipe.id)); assert(null!=pipe.ringWalker) : "NullPointer, double check that pipe was passed into super constructor of stage."; if (FieldReferenceOffsetManager.isTemplateStart(Pipe.from(pipe), pipe.ringWalker.nextCursor)) { assert(StackStateWalker.isSeqStackEmpty(pipe.ringWalker)) : "Error the seqStack should be empty"; return StackStateWalker.prepReadMessage(pipe, pipe.ringWalker); } else { return StackStateWalker.prepReadFragment(pipe, pipe.ringWalker); } }
public static <S extends MessageSchema<S>> boolean tryReadFragment(Pipe<S> pipe) { assert( (!PipeReader.hasContentToRead(pipe)) || PipeMonitor.monitor(pipe, pipe.ringWalker.nextWorkingTail, Pipe.bytesReadBase(pipe) ) ); assert(pipe.usingHighLevelAPI); assert(Pipe.singleThreadPerPipeRead(pipe.id)); assert(null!=pipe.ringWalker) : "NullPointer, double check that pipe was passed into super constructor of stage."; if (FieldReferenceOffsetManager.isTemplateStart(Pipe.from(pipe), pipe.ringWalker.nextCursor)) { assert(StackStateWalker.isSeqStackEmpty(pipe.ringWalker)) : "Error the seqStack should be empty"; return StackStateWalker.prepReadMessage(pipe, pipe.ringWalker); } else { return StackStateWalker.prepReadFragment(pipe, pipe.ringWalker); } }
public static <S extends MessageSchema<S>> boolean tryReadFragment(Pipe<S> pipe) { assert( (!PipeReader.hasContentToRead(pipe)) || PipeMonitor.monitor(pipe, pipe.ringWalker.nextWorkingTail, Pipe.bytesReadBase(pipe) ) ); assert(pipe.usingHighLevelAPI); assert(Pipe.singleThreadPerPipeRead(pipe.id)); assert(null!=pipe.ringWalker) : "NullPointer, double check that pipe was passed into super constructor of stage."; if (FieldReferenceOffsetManager.isTemplateStart(Pipe.from(pipe), pipe.ringWalker.nextCursor)) { assert(StackStateWalker.isSeqStackEmpty(pipe.ringWalker)) : "Error the seqStack should be empty"; return StackStateWalker.prepReadMessage(pipe, pipe.ringWalker); } else { return StackStateWalker.prepReadFragment(pipe, pipe.ringWalker); } }
|| PipeMonitor.monitor(pipeIn, pipeIn.ringWalker.nextWorkingTail, Pipe.bytesReadBase(pipeIn)
|| PipeMonitor.monitor(pipeIn, pipeIn.ringWalker.nextWorkingTail, Pipe.bytesReadBase(pipeIn)
|| PipeMonitor.monitor(pipeIn, pipeIn.ringWalker.nextWorkingTail, Pipe.bytesReadBase(pipeIn)