/** * Restore position to the beginning, the ChannelReader is invalidated * beginRead() must be called again for another read. */ public void rollback() { if (isReading) { Pipe.resetTail(pipe); } isReading = false; }
/** * Restore position to the beginning, the ChannelReader is invalidated * beginRead() must be called again for another read. */ public void rollback() { if (isReading) { Pipe.resetTail(pipe); } isReading = false; }
/** * Restore position to the beginning, the ChannelReader is invalidated * beginRead() must be called again for another read. */ public void rollback() { if (isReading) { Pipe.resetTail(pipe); } isReading = false; }
protected void consumeStoreWriteAck(int index, Object target, Pipe<PersistedBlobLoadProducerSchema> p) { final int store = IntHashTable.getItem(serialStoreProdAckPipeMap, NON_ZERO_BASE+p.id)-NON_ZERO_BASE; while (Pipe.hasContentToRead(p)) { Pipe.markTail(p); int msgIdx = Pipe.takeMsgIdx(p); if (msgIdx == PersistedBlobLoadProducerSchema.MSG_ACKWRITE_11) { long value = Pipe.takeLong(p); if (!((SerialStoreProducerAckListener)target).producerAck(store, value)) { Pipe.resetTail(p); return;//continue later and repeat this same value. } } else { logger.error("unrecognized message on {} ",p); throw new UnsupportedOperationException("unexpected message "+msgIdx); } Pipe.confirmLowLevelRead(p, Pipe.sizeOf(p,msgIdx)); Pipe.releaseReadLock(p); } }
protected void consumeStoreReleaseAck(int index, Object target, Pipe<PersistedBlobLoadReleaseSchema> p) { final int store = IntHashTable.getItem(serialStoreRelAckPipeMap, NON_ZERO_BASE+p.id)-NON_ZERO_BASE; while (Pipe.hasContentToRead(p)) { Pipe.markTail(p); int msgIdx = Pipe.takeMsgIdx(p); if (msgIdx == PersistedBlobLoadReleaseSchema.MSG_ACKRELEASE_10) { long value = Pipe.takeLong(p); if (!((SerialStoreReleaseAckListener)target).releaseAck(store, value)) { Pipe.resetTail(p); return;//continue later and repeat this same value. } } else { logger.error("unrecognized message on {} ",p); throw new UnsupportedOperationException("unexpected message "+msgIdx); } Pipe.confirmLowLevelRead(p, Pipe.sizeOf(p,msgIdx)); Pipe.releaseReadLock(p); } }
Pipe.resetTail(p); return;//continue later and repeat this same value. Pipe.resetTail(p); return;//continue later and repeat this same value. logger.warn("Unexpected error ",t); //TODO: refine this Pipe.resetTail(p); return;//continue later and repeat this same value. Pipe.resetTail(p); return;//continue later and repeat this same value.