public static int publishWrites(Pipe pipe) { int i = pipe.pubListeners.length; while (--i>=0) { ((PipePublishListener)(pipe.pubListeners[i])).published(); } assert(Pipe.singleThreadPerPipeWrite(pipe.id)); assert(Pipe.workingHeadPosition(pipe)!=Pipe.headPosition(pipe)) : "Fragment was already published, check the workflow logic and remove call to publishWrites(pipe)"; int consumed = Pipe.writeTrailingCountOfBytesConsumed(pipe, pipe.ringWalker.nextWorkingHead-1 ); //single length field still needs to move this value up, so this is always done Pipe.updateBytesWriteLastConsumedPos(pipe); if ((Pipe.decBatchPublish(pipe)>0)) { Pipe.storeUnpublishedWrites(pipe); return consumed; } publishWrites2(pipe); return consumed; }
public static int publishWrites(Pipe pipe) { int i = pipe.pubListeners.length; while (--i>=0) { ((PipePublishListener)(pipe.pubListeners[i])).published(); } assert(Pipe.singleThreadPerPipeWrite(pipe.id)); assert(Pipe.workingHeadPosition(pipe)!=Pipe.headPosition(pipe)) : "Fragment was already published, check the workflow logic and remove call to publishWrites(pipe)"; int consumed = Pipe.writeTrailingCountOfBytesConsumed(pipe, pipe.ringWalker.nextWorkingHead-1 ); //single length field still needs to move this value up, so this is always done Pipe.updateBytesWriteLastConsumedPos(pipe); if ((Pipe.decBatchPublish(pipe)>0)) { Pipe.storeUnpublishedWrites(pipe); return consumed; } publishWrites2(pipe); return consumed; }
public static int publishWrites(Pipe pipe) { int i = pipe.pubListeners.length; while (--i>=0) { ((PipePublishListener)(pipe.pubListeners[i])).published(Pipe.workingHeadPosition(pipe)); } assert(Pipe.singleThreadPerPipeWrite(pipe.id)); assert(Pipe.workingHeadPosition(pipe)!=Pipe.headPosition(pipe)) : "Fragment was already published, check the workflow logic and remove call to publishWrites(pipe)"; int consumed = Pipe.writeTrailingCountOfBytesConsumed(pipe, pipe.ringWalker.nextWorkingHead-1 ); //single length field still needs to move this value up, so this is always done Pipe.updateBytesWriteLastConsumedPos(pipe); if ((Pipe.decBatchPublish(pipe)>0)) { Pipe.storeUnpublishedWrites(pipe); return consumed; } publishWrites2(pipe); return consumed; }