public class Pipe<T extends MessageSchema<T>> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Pipe.PaddedInt
Provides a container holding an int value that fills a 64-byte cache line.
|
static class |
Pipe.PaddedLong
Provides a container holding a long value that fills a 64-byte cache line.
|
| Modifier and Type | Field and Description |
|---|---|
byte |
bitsOfBlogRing |
byte |
bitsOfSlabRing |
protected byte[] |
blobConstBuffer |
int |
blobMask |
byte[] |
blobRing |
static int |
BYTES_WRAP_MASK |
static int |
EOF_SIZE |
int |
id |
int |
lastMsgIdx |
int |
maxVarLen |
static int |
RELATIVE_POS_MASK |
int |
sizeOfBlobRing |
int |
sizeOfSlabRing |
int |
slabMask |
static int |
STRUCTURED_POS_MASK |
| Constructor and Description |
|---|
Pipe(PipeConfig<T> config)
Build new Pipe instance.
|
Pipe(PipeConfig<T> config,
boolean usingHighLevelAPI)
Build new Pipe instance.
|
| Modifier and Type | Method and Description |
|---|---|
static <S extends MessageSchema<S>> |
abandonWrites(Pipe<S> pipe)
Abandon the fragment written so far so a different fragment can be written or
non at all.
|
static <S extends MessageSchema<S>> |
addAndGetBlobHeadPosition(Pipe<S> pipe,
int inc)
Direct access to add and get Blob head position
|
static <S extends MessageSchema<S>> |
addAndGetBlobWorkingHeadPosition(Pipe<S> pipe,
int inc)
Direct access method for incrementing blob working head position
|
static <S extends MessageSchema<S>> |
addAndGetBlobWorkingTailPosition(Pipe<S> pipe,
int inc)
Direct access to add and get working tail position
|
static <S extends MessageSchema<S>> |
addAndGetWorkingHead(Pipe<S> pipe,
int inc)
Directly increment the working head position for the slab
|
static <S extends MessageSchema<S>> |
addAndGetWorkingTail(Pipe<S> pipe,
int inc)
Direct access to increment working tail position
|
static <S extends MessageSchema<S>> |
addASCII(char[] source,
int sourceIdx,
int sourceCharCount,
Pipe<S> pipe)
Add these chars as ASCII values to output pipe
|
static <S extends MessageSchema<S>> |
addASCII(CharSequence source,
int sourceIdx,
int sourceCharCount,
Pipe<S> pipe)
Add these chars as ASCII values to output pipe
|
static <S extends MessageSchema<S>> |
addASCII(CharSequence source,
Pipe<S> rb)
Writes ASCII to specified pipe
|
static <S extends MessageSchema<S>> |
addByteArray(byte[] source,
int sourceIdx,
int sourceLen,
int sourceMask,
Pipe<S> pipe)
Writes a a byte array to the specified pipe
|
static <S extends MessageSchema<S>> |
addByteArray(byte[] source,
int sourceIdx,
int sourceLen,
Pipe<S> pipe)
Writes a byte array to the specified pipe
|
static <S extends MessageSchema<S>> |
addByteArray(byte[] source,
Pipe<S> pipe)
Writes a byte array to the specified pipe
|
static <S extends MessageSchema<S>,T extends MessageSchema<T>> |
addByteArray(Pipe<S> source,
Pipe<T> target)
directly copy byte array field from the source pipe to the target pipe
|
static <S extends MessageSchema<S>> |
addByteArrayWithMask(Pipe<S> outputRing,
int mask,
int len,
byte[] data,
int offset)
Add byte array to target pipe
|
static <S extends MessageSchema<S>> |
addByteBuffer(ByteBuffer source,
int length,
Pipe<S> pipe)
add byte buffer as a field in pipe
|
static <S extends MessageSchema<S>> |
addByteBuffer(ByteBuffer source,
Pipe<S> pipe)
add byte buffer as a field in pipe
|
static <S extends MessageSchema<S>> |
addBytePosAndLen(Pipe<S> pipe,
int position,
int length)
Writes position and length of byte to add to the pipe
|
static <S extends MessageSchema<S>> |
addBytePosAndLenSpecial(Pipe<S> targetOutput,
int startBytePos,
int bytesLength)
Writes the position and len for a var byte field to the pipe but it does not move the
byte count forward, that is assumed to already be done.
|
static <S extends MessageSchema<S>> |
addDecimal(int exponent,
long mantissa,
Pipe<S> pipe)
add Decimal value to pipe
|
static <S extends MessageSchema<S>> |
addDecimalAsASCII(int readDecimalExponent,
long readDecimalMantissa,
Pipe<S> outputRing)
Writes decimal as ASCII to specified Pipe
|
static <S extends MessageSchema<S>> |
addIntAsASCII(Pipe<S> output,
int value)
Writes in an int as an ASCII character to specified pipe
|
static <S extends MessageSchema<S>> |
addIntValue(int value,
Pipe<S> pipe)
Writes an int value to the specified pipe
|
static <S extends MessageSchema<S>> |
addLongAsASCII(Pipe<S> output,
long value)
Writes in a long as an ASCII character to specified pipe
|
static <S extends MessageSchema<S>> |
addLongAsUTF8(Pipe<S> digitBuffer,
int length)
Writes long as UTF8 with specified length to Pipe
|
static <S extends MessageSchema<S>> |
addLongAsUTF8(Pipe<S> digitBuffer,
long length)
Writes long as UTF8 with specified length to named Pipe
|
static <S extends MessageSchema<S>> |
addLongValue(int[] buffer,
int mask,
Pipe.PaddedLong headCache,
long value)
Writes long value to the specified pipe
|
static <S extends MessageSchema<S>> |
addLongValue(long value,
Pipe<S> pipe)
Writes long value to the specified pipe
|
static <S extends MessageSchema<S>> |
addMsgIdx(Pipe<S> pipe,
int msgIdx)
Called to start a new message when using the low level API
|
static <S extends MessageSchema<S>> |
addNullByteArray(Pipe<S> pipe)
add a null byte array in this position of the target pipe
|
static void |
addPubListener(Pipe p,
PipePublishListener listener)
Adds a pub listener to the specified pipe
|
static <S extends MessageSchema<S>> |
addRationalAsASCII(Pipe<S> pipe,
long numerator,
long denominator)
Write ascii text for rational value
|
static <S extends MessageSchema<S>> |
addUTF8(char[] source,
int sourceCharCount,
Pipe<S> rb)
Writes array of UTF8 characters to specified pipe
|
static <S extends MessageSchema<S>> |
addUTF8(CharSequence source,
int sourceCharCount,
Pipe<S> pipe)
Writes UTF8 characters to specified pipe
|
static <S extends MessageSchema<S>> |
addUTF8(CharSequence source,
Pipe<S> rb)
Writes UTF8 characters to specified pipe
|
static <S extends MessageSchema> |
addValue(int[] buffer,
int mask,
Pipe.PaddedLong headCache,
int value1,
int value2,
int value3)
add 3 integer values in a single call
|
static <S extends MessageSchema<S>> |
appendFragment(Pipe<S> input,
Appendable target,
int fragIdx)
Debug write of this fragment to the target appendable
|
static <S extends MessageSchema<S>> |
batchAllReleases(Pipe<S> pipe)
sets maximum batch count for releases.
|
static <S extends MessageSchema<S>> |
batchedReleasePublish(Pipe<S> pipe,
int blobTail,
long slabTail)
If batch is not yet full this new publish is stored else this is added and released with the rest
|
static <S extends MessageSchema<S>> |
beginNewPublishBatch(Pipe<S> pipe)
start new batch for publish
|
static <S extends MessageSchema<S>> |
beginNewReleaseBatch(Pipe<S> pipe)
start new batch for release
|
static <S extends MessageSchema<S>> |
blob(Pipe<S> pipe)
Direct access to blob backing array.
|
static <S extends MessageSchema<S>> |
blobIndexBasePosition(Pipe<S> pipe)
Base byte position where the index begins.
|
static <S extends MessageSchema<S>> |
blobMask(Pipe<S> pipe)
Direct access to the mask for looping the blob.
|
static <S extends MessageSchema<S>> |
buildPipes(int count,
PipeConfig<S> commonConfig)
Build and array of Pipe instances from a single PipeConfig
|
static Pipe[] |
buildPipes(PipeConfig[] configs)
Build an array of Pipe instances from a set of PipeConfig.
|
static <S extends MessageSchema<S>> |
byteBackingArray(int meta,
Pipe<S> pipe)
Given the meta data for the var length field return the backing array.
|
static <S extends MessageSchema<S>> |
byteBuffer(Pipe<S> pipe)
Deprecated.
|
static <S extends MessageSchema<S>> |
bytePosition(int meta,
Pipe<S> pipe,
int len)
convert meta and len field data into a specific position field.
|
static <S extends MessageSchema<S>> |
bytesOfContent(Pipe<S> ringBuffer)
All bytes even those not yet committed.
|
static <S extends MessageSchema<S>> |
bytesReadBase(Pipe<S> pipe)
get base position based on the var length data written.
|
static <S extends MessageSchema<S>> |
bytesWriteBase(Pipe<S> pipe)
base position to track where the var length
|
static <S extends MessageSchema<S>> |
cancelReplay(Pipe<S> pipe)
Cancels replay of specified ringBuffer
|
void |
closeBlobFieldWrite()
Mark this pipe as finished writing blob var len field.
|
static <S extends MessageSchema<S>> |
computeCountOfBytesConsumed(Pipe<S> pipe)
Total count of bytes consumed since start of this fragment
|
static <S extends MessageSchema<S>> |
computeMaxBatchSize(Pipe<S> pipe)
maximum batch size based on the Pipe configuration
|
static <S extends MessageSchema<S>> |
computeMaxBatchSize(Pipe<S> pipe,
int mustFit)
maximum batch size based on pipe and must fit batches count
|
static <S extends MessageSchema<S>> |
computeRateLimitConsumerDelay(Pipe<S> pipe)
Returns nano-second count of how much time should pass before consuming more data
from this pipe.
|
static <S extends MessageSchema<S>> |
computeRateLimitProducerDelay(Pipe<S> pipe)
Returns nano-second count of how much time should pass before producing more data
into this pipe.
|
PipeConfig<T> |
config()
Return the configuration used for this pipe, Helpful when we need to make clones of the ring which will hold same message types.
|
static <S extends MessageSchema<S>> |
confirmLowLevelRead(Pipe<S> pipe,
long size)
Confirm low level read of message of this size, Must be called after read to move cursor forward for next read.
|
static <S extends MessageSchema<S>> |
confirmLowLevelWrite(Pipe<S> output)
Confirm low level write, Must be called after every fragment write to move cursor to next fragment to write
|
static <S extends MessageSchema<S>> |
confirmLowLevelWrite(Pipe<S> output,
int size)
Confirm low level write of fragment of the provided size.
|
static <S extends MessageSchema<S>> |
confirmLowLevelWriteUnchecked(Pipe<S> output,
int size)
Method used for moving more than one fragment at a time.
|
static <S extends MessageSchema<S>> |
contentRemaining(Pipe<S> pipe)
Content remaining on Pipe to be consumed.
|
static <S extends MessageSchema<S>> |
convertToPosition(int meta,
Pipe<S> pipe)
convert meta field data into a specific position field.
|
static int |
convertToUTF8(char[] charSeq,
int charSeqOff,
int charSeqLength,
byte[] targetBuf,
int targetIdx,
int targetMask)
Converts chars in an array to bytes based on UTF8 encoding.
|
static int |
convertToUTF8(CharSequence charSeq,
int charSeqOff,
int charSeqLength,
byte[] targetBuf,
int targetIdx,
int targetMask)
Converts chars in an array to bytes based on UTF8 encoding.
|
static <S extends MessageSchema<S>> |
copyASCIIToBytes(char[] source,
int sourceIdx,
int sourceLen,
Pipe<S> pipe)
Copy ascii chars as bytes into a var field in the pipe
|
static <S extends MessageSchema<S>> |
copyASCIIToBytes(CharSequence source,
int sourceIdx,
int sourceLen,
Pipe<S> pipe)
Add these chars as ASCII values to output pipe
|
static <S extends MessageSchema<S>> |
copyASCIIToBytes(CharSequence source,
Pipe<S> pipe)
copy ASCII to bytes
|
static <S extends MessageSchema<S>> |
copyByteBuffer(ByteBuffer source,
int length,
Pipe<S> pipe)
copy ByteBuffer into pipe as a field.
|
static void |
copyBytesFromArrayToRing(byte[] source,
int sourceloc,
byte[] target,
int targetloc,
int targetMask,
int length)
Copy bytes from a non-wrapping array into a ring buffer (an array which wraps)
|
static void |
copyBytesFromToRing(byte[] source,
int sourceloc,
int sourceMask,
byte[] target,
int targetloc,
int targetMask,
int length)
Copies bytes from specified location to Ring
|
static <S extends MessageSchema<S>> |
copyFragment(Pipe<S> source,
Pipe<S> target)
Returns the slab size of this copied fragment.
|
static void |
copyIntsFromToRing(int[] source,
int sourceloc,
int sourceMask,
int[] target,
int targetloc,
int targetMask,
int length)
Copies ints from specified location to Ring
|
static <S extends MessageSchema<S>> |
copyUTF8ToByte(char[] source,
int sourceOffset,
int sourceCharCount,
Pipe<S> pipe)
Copy chars to UTF8 encoded bytes
|
static <S extends MessageSchema<S>> |
copyUTF8ToByte(char[] source,
int sourceCharCount,
Pipe<S> pipe)
Copy chars to UTF8 encoded bytes
|
static int |
copyUTF8ToByte(CharSequence source,
int sourceIdx,
byte[] target,
int targetMask,
int targetIdx,
int charCount)
Copy CharSequence to bytes field in the pipe using UTF8 encoding.
|
static <S extends MessageSchema<S>> |
copyUTF8ToByte(CharSequence source,
int sourceOffset,
int sourceCharCount,
Pipe<S> pipe)
Copy CharSequence to bytes field in the pipe using UTF8 encoding.
|
protected DataInputBlobReader<T> |
createNewBlobReader() |
protected DataOutputBlobWriter<T> |
createNewBlobWriter() |
void |
creationStack()
Prints the call stack as it was when this pipe was created.
|
static <S extends MessageSchema<S>> |
decBatchPublish(Pipe<S> pipe)
decrement batch publish count down
|
static <S extends MessageSchema<S>> |
decBatchRelease(Pipe<S> pipe)
decrement batch release count down
|
static long |
decodeUTF8Fast(byte[] source,
long posAndChar,
int mask)
Convert bytes into a single char using UTF-8.
|
static <S extends MessageSchema<S>> |
encodeSingleChar(int c,
byte[] buffer,
int mask,
int pos)
UTF8 Encode single char to bytes
|
static <S extends MessageSchema<S>> |
estBytesAllocated(Pipe<S> pipe)
Estimate of the total bytes consumed by this pipe
|
static <S extends MessageSchema<S>> |
from(Pipe<S> pipe)
Field reference offset manager for the schema used by this pipe.
|
static <S extends MessageSchema<S>> |
getBlobHeadPosition(Pipe<S> pipe)
Direct access to read blob head position.
|
static <S extends MessageSchema<S>> |
getBlobRingTailPosition(Pipe<S> pipe)
Deprecated.
|
static <S extends MessageSchema<S>> |
getBlobTailPosition(Pipe<S> pipe)
Direct access to get blob tail position.
|
static <S extends MessageSchema<S>> |
getBlobWorkingHeadPosition(Pipe<S> pipe)
Deprecated.
|
static <S extends MessageSchema<S>> |
getPublishBatchSize(Pipe<S> pipe)
get the publish batch count
|
static <S extends MessageSchema<S>> |
getReleaseBatchSize(Pipe<S> pipe)
get the release batch count
|
static <S extends MessageSchema<S>> |
getSlabHeadPosition(Pipe<S> pipe)
Direct access to the head position of the slab
|
static <S extends MessageSchema<S>> |
getWorkingBlobHeadPosition(Pipe<S> pipe)
Direct method to get the working blob head position
|
static <S extends MessageSchema<S>> |
getWorkingBlobTailPosition(Pipe<S> pipe)
Direct access to working blob tail position
|
static <S extends MessageSchema<S>> |
getWorkingHeadPositionObject(Pipe<S> pipe)
Direct access to working head position object
|
static <S extends MessageSchema<S>> |
getWorkingTailPosition(Pipe<S> pipe)
Direct access to working tail position of the slab
|
static <S extends MessageSchema<S>> |
getWorkingTailPositionObject(Pipe<S> pipe)
Direct access to working tail position object
|
static <S extends MessageSchema<S>> |
hasContentToRead(Pipe<S> pipe)
Checks specified pipe to see if there is any data to read.
|
static <S extends MessageSchema<S>> |
hasContentToRead(Pipe<S> pipe,
int size)
Low level API only for checking if there is content to read of the size provided.
|
static <S extends MessageSchema<S>> |
hasRoomForWrite(Pipe<S> pipe)
Checks the specified pipe to see if there is room to write
|
static <S extends MessageSchema<S>> |
hasRoomForWrite(Pipe<S> pipe,
int size)
Checks if outgoing pipe has room for low level fragment write of the given size.
|
static <S extends MessageSchema<S>> |
headPosition(Pipe<S> pipe)
Direct access to the head position of the slab
|
Pipe<T> |
initBuffers()
Allocates all internal arrays and buffers before the Pipe can be used
|
static <S extends MessageSchema<S>> |
inputStream(Pipe<S> pipe)
get the input stream associated with this pipe
|
static <S extends MessageSchema<S>> |
isEmpty(Pipe<S> pipe)
Checks to see whether pipe has any data or not.
|
static <S extends MessageSchema<S>> |
isEndOfPipe(Pipe<S> pipe,
long tailPosition)
Checks to see if the end of the pipe has been reached
|
static boolean |
isEqual(byte[] aBack,
int aPos,
int aMask,
byte[] bBack,
int bPos,
int bMask,
int len)
Check if both segments of bytes are equal
|
static <S extends MessageSchema<S>> |
isEqual(Pipe<S> pipe,
byte[] expected,
int expectedPos,
int meta,
int len)
checks for equals bytes
|
static <S extends MessageSchema<S>> |
isEqual(Pipe<S> pipe,
CharSequence charSeq,
int meta,
int len)
Checks if given CharSequence is equal to data in a given area
|
static <S extends MessageSchema<S>> |
isForDynamicSchema(Pipe<S> pipe)
Checks if pipe uses a dynamic schema which is not backed by an XML contract file.
|
static <S extends MessageSchema<S>,T extends MessageSchema<T>> |
isForSameSchema(Pipe<S> pipeA,
Pipe<T> pipeB)
Checks if both pipes use the same schemas.
|
static <S extends MessageSchema<S>,T extends MessageSchema<T>> |
isForSchema(Pipe<S> pipe,
Class<T> schema)
Checks if schema matches that used by the pipe.
|
static <S extends MessageSchema<S>,T extends MessageSchema<T>> |
isForSchema(Pipe<S> pipe,
T schema)
Checks if schema matches that used by the pipe.
|
static <S extends MessageSchema<S>> |
isInBlobFieldWrite(Pipe<S> pipe)
Bookkeeping method to track if a write is in progress to the blob.
|
static <S extends MessageSchema<S>> |
isInit(Pipe<S> pipe)
is the pipe initialized and ready for use.
|
static <S extends MessageSchema<S>> |
isRateLimitedConsumer(Pipe<S> pipe)
Check if the rate is limited from the consumer side of the pipe.
|
static <S extends MessageSchema<S>> |
isRateLimitedProducer(Pipe<S> pipe)
Check if the rate is limited from the producer side of the pipe.
|
static <S extends MessageSchema<S>> |
isReplaying(Pipe<S> pipe)
Checks to see if the provided pipe is replaying.
|
static <S extends MessageSchema<S>> |
isShutdown(Pipe<S> pipe)
check if this pipe has been shutdown
|
static <S extends MessageSchema<S>> |
lastConfirmedWritePosition(Pipe<S> output)
get last confirmed write position in the slab
|
static <S extends MessageSchema<S>> |
leftConvertIntToASCII(Pipe<S> pipe,
int value,
int idx)
Deprecated.
|
static <S extends MessageSchema<S>> |
leftConvertLongToASCII(Pipe<S> pipe,
long value,
int idx)
Deprecated.
|
static <S extends MessageSchema<S>> |
markBytesReadBase(Pipe<S> pipe)
auto compute and store bytes consumed for fragment bookkeeping
|
static <S extends MessageSchema<S>> |
markBytesReadBase(Pipe<S> pipe,
int bytesConsumed)
store bytes consumed for fragment bookkeeping
|
static <S extends MessageSchema<S>> |
markBytesWriteBase(Pipe<S> pipe)
Store new var len base written position.
|
static void |
markHead(Pipe pipe)
Hold this position in case we want to abandon what is written
|
static void |
markTail(Pipe pipe)
Hold this position in case we want to re-read this single message
|
static <S extends MessageSchema<S>> |
moveBlobPointerAndRecordPosAndLength(int originalBlobPosition,
int len,
Pipe<S> output)
Record the number of bytes written after direct manipulation of the backing array.
|
static <S extends MessageSchema<S>> |
moveBlobPointerAndRecordPosAndLength(int len,
Pipe<S> output)
Record the number of bytes written after direct manipulation of the backing array.
|
static <S extends MessageSchema<S>> |
notifyPubListener(Pipe<S> pipe)
Notify any listeners to thsi pipe that a publication has been made.
|
void |
openBlobFieldWrite()
Prep this pipe for writing a blob var len field.
|
static <S extends MessageSchema<S>> |
openInputStream(Pipe<S> pipe)
get the input stream associated with this Pipe and open it
|
static <S extends MessageSchema<S>> |
openOutputStream(Pipe<S> pipe)
get the output stream associated with this pipe and open it
|
static <S extends MessageSchema<S>> |
orIntValue(int value,
Pipe<S> pipe,
long position)
Ors int value to specific position in the given pipe
|
static <S extends MessageSchema<S>> |
orValue(int[] buffer,
int mask,
long offset,
int value)
or an int value at this position
|
static <S extends MessageSchema<S>> |
outputStream(Pipe<S> pipe)
get the output stream associated with this pipe
|
static <S extends MessageSchema<S>> |
peek(int[] buf,
long pos,
int mask)
Peek an int value without moving the cursors.
|
static <S extends MessageSchema<S>> |
peekInputStream(Pipe<S> pipe,
int offset)
get the input stream but do not move the cursor position.
|
static <S extends MessageSchema<S>> |
peekInt(Pipe<S> pipe)
peek the int value at this position
|
static <S extends MessageSchema<S>> |
peekInt(Pipe<S> pipe,
int offset)
peek the int value at this relative offset from where the cursor is upon call
|
static <S extends MessageSchema<S>> |
peekLong(int[] buf,
long pos,
int mask)
Peek a long value without moving the cursors.
|
static <S extends MessageSchema<S>> |
peekLong(Pipe<S> pipe,
int offset)
peek the long value at this relative offset from where the cursor is upon call
|
static <S extends MessageSchema<S>> |
peekMsg(Pipe<S> pipe,
int expected)
peek message and determine if it matches the expected value
|
static <S extends MessageSchema<S>> |
peekMsg(Pipe<S> pipe,
int expected1,
int expected2)
peek message and determine if it matches one of 2 potential values
|
static <S extends MessageSchema<S>> |
peekMsg(Pipe<S> pipe,
int expected1,
int expected2,
int expected3)
peek message and determine if it matches one of 3 potential values
|
static <S extends MessageSchema<S>> |
peekNotMsg(Pipe<S> pipe,
int expected)
peek message and determine if it does not match the expected value
|
static <S extends MessageSchema<S>,A extends Appendable> |
peekUTF8(Pipe<S> pipe,
int offset,
A target)
peek UTF8 text at this relative offset from where the cursor is upon call
|
static <S extends MessageSchema<S>> |
presumeRoomForWrite(Pipe<S> pipe)
Check if there is room to write the largest known message.
|
static <S extends MessageSchema<S>> |
primaryBuffer(Pipe<S> pipe)
Deprecated.
|
static <S extends MessageSchema<S>> |
primarySize(Pipe<S> pipe)
Deprecated.
|
static <S extends MessageSchema<S>> |
publishAllBatchedWrites(Pipe<S> pipe)
Publish any writes that were held back due to batching.
|
static <S extends MessageSchema<S>> |
publishBlobWorkingTailPosition(Pipe<S> pipe,
int blobWorkingTailPos)
Direct access to publish working tail position
|
static void |
publishEOF(Pipe<?>[] pipe)
Publish an EOF value to all the outgoing pipes
|
static <S extends MessageSchema<S>> |
publishEOF(Pipe<S> pipe)
Publish EOF message to the target pipe
|
static <S extends MessageSchema<S>> |
publishHeadPositions(Pipe<S> pipe)
Internal method to publish head positions as part of publish writes process
|
static <S extends MessageSchema<S>> |
publishWorkingHeadPosition(Pipe<S> pipe,
long workingHeadPos)
This method is only for build transfer stages that require direct manipulation of the position.
|
static <S extends MessageSchema<S>> |
publishWorkingTailPosition(Pipe<S> pipe,
long workingTailPos)
This method is only for build transfer stages that require direct manipulation of the position.
|
static <S extends MessageSchema<S>> |
publishWrites(Pipe<S> pipe)
Low level API for publish for new fragment.
|
static <S extends MessageSchema<S>> |
publishWrites(Pipe<S> pipe,
int optionalHiddenTrailingBytes)
Publish writes for this fragment so consumer stage can see it.
|
static <S extends MessageSchema<S>> |
publishWritesBatched(Pipe<S> pipe)
Publish all the batched writes so they can all be seen by the consumer stage
|
static <S extends MessageSchema<S>,A extends Appendable> |
readASCII(Pipe<S> pipe,
A target,
int meta,
int len)
Reads ASCII characters at given section of a pipe
|
static <S extends MessageSchema<S>> |
readByteArraMetaData(int pos,
Pipe<S> pipe)
Read meta data for a given var length field at this position
|
static <S extends MessageSchema<S>> |
readByteArrayLength(int idx,
Pipe<S> pipe)
Read the length portion of the var length field
|
static <S extends MessageSchema<S>> |
readBytes(Pipe<S> pipe,
byte[] target,
int targetIdx,
int targetMask,
int meta,
int len)
Reads bytes from specified pipe at given index
|
static <S extends MessageSchema<S>> |
readBytes(Pipe<S> pipe,
ByteBuffer target,
int meta,
int len)
Read var length field into a target ByteBuffer
|
static <S extends MessageSchema<S>> |
readBytes(Pipe<S> pipe,
DataOutputBlobWriter<?> target)
Read var length field from the pipe, position must be set up first.
|
static <S extends MessageSchema<S>> |
readBytes(Pipe<S> pipe,
DataOutputBlobWriter<?> target,
int meta,
int len)
Read var length field into a DataOutputBlobWriter, eg another field.
|
static boolean |
readFieldFromInputStream(Pipe pipe,
InputStream inputStream,
int byteCount)
Read from InputStream and write the bytes to the var len field.
|
static int |
readInt(int[] buffer,
int mask,
long index)
read the int at this index in the buffer and return it.
|
static int |
readIntSecure(int[] buffer,
int mask,
long index,
int clearValue)
Read and return the int value at this position and clear the value with the provided clearValue.
|
static <S extends MessageSchema<S>> |
readIntValue(int[] backing,
int mask,
long position)
read int value at the given position
|
static <S extends MessageSchema<S>> |
readIntValue(int idx,
Pipe<S> pipe)
Reads the data at a specific index on the given pipe and returns an int
|
static long |
readLong(int[] buffer,
int mask,
long index)
Read long value from int buffer
|
static <S extends MessageSchema<S>> |
readLong(int idx,
Pipe<S> pipe)
Reads the value at specified index on the given pipe and returns a long
|
static <S extends MessageSchema<S>> |
readNextWithoutReleasingReadLock(Pipe<S> pipe)
Move cursor forward to next fragment for reading but does NOT release the previous fragment
to be written over.
|
static <S extends MessageSchema<S>,A extends Appendable> |
readOptionalASCII(Pipe<S> pipe,
A target,
int meta,
int len)
Reads ASCII characters or an optional null at given section of a pipe
|
static <S extends MessageSchema<S>> |
readOptionalUTF8(Pipe<S> pipe,
Appendable target,
int meta,
int len)
Reads UTF8 characters or a null value from the specified pipe
|
static <S extends MessageSchema<S>> |
readRingByteMetaData(int pos,
Pipe<S> pipe)
Deprecated.
|
static <S extends MessageSchema<S>,A extends Appendable> |
readUTF8(Pipe<S> pipe,
A target,
int meta,
int len)
Reads UTF8 characters from specified Pipe
|
static <S extends MessageSchema<S>> |
readValue(int[] rbB,
int rbMask,
long rbPos)
Deprecated.
|
static <S extends MessageSchema<S>> |
readValue(int idx,
Pipe<S> pipe)
Deprecated.
|
static <S extends MessageSchema<S>> |
releaseAllBatchedReads(Pipe<S> pipe)
Release any reads that were held back due to batching.
|
static <S extends MessageSchema<S>> |
releaseAllPendingReadLock(Pipe<S> pipe)
Release all pending fragments for release
|
static <S extends MessageSchema<S>> |
releaseBatchedReadReleasesUpToPosition(Pipe<S> pipe,
long newTailToPublish,
int newTailBytesToPublish)
Release all batched read releases up to the passed in position.
|
static <S extends MessageSchema<S>> |
releaseBatchedReadReleasesUpToThisPosition(Pipe<S> pipe)
Release all batched read releases up to the current position.
|
static <S extends MessageSchema<S>> |
releasePendingAsReadLock(Pipe<S> pipe,
int consumed)
Release for write the old fragments which total up to the provided consumed number of bytes.
|
static <S extends MessageSchema<S>> |
releasePendingByteCount(Pipe<S> pipe)
Count of how many bytes are pending in the total of all pending release fragments
|
static <S extends MessageSchema<S>> |
releasePendingCount(Pipe<S> pipe)
Count of how many fragments are pending release.
|
static <S extends MessageSchema<S>> |
releasePendingReadLock(Pipe<S> pipe)
Release for write the old fragment read which are pending release.
|
static <S extends MessageSchema<S>> |
releaseReadLock(Pipe<S> pipe)
Release read lock on this fragment.
|
static <S extends MessageSchema<S>> |
releaseReads(Pipe<S> pipe)
Deprecated.
|
static void |
releaseReadsBatched(Pipe<MessageSchemaDynamic> pipe)
Publish all the batched up publish calls.
|
static void |
removePubListener(Pipe p,
PipePublishListener listener)
Removes a pub listener from the specified pipe
|
static <S extends MessageSchema<S>> |
replayUnReleased(Pipe<S> pipe)
Back up the cursor read position.
|
void |
reset()
Empty and restore to original values.
|
void |
reset(int structuredPos,
int unstructuredPos)
Rest to desired position, helpful in unit testing to force wrap off the end.
|
static void |
resetHead(Pipe pipe)
abandon what has been written in this fragment back to the markHead position.
|
static void |
resetTail(Pipe pipe)
abandon what has been read and move back to top of fragment to read again.
|
static <S extends MessageSchema<S>> |
roomToLowLevelWrite(Pipe<S> pipe,
int size)
Deprecated.
|
static int |
safeBlobPosAdd(int pos,
long value)
safe addition to position by masking early to ensure this value does not become negative.
|
static <S extends MessageSchema<S>> |
schemaName(Pipe<S> pipe)
get name of the schema.
|
static <S extends MessageSchema<S>> |
setBlobHeadPosition(Pipe<S> pipe,
int value)
Direct access to set blob head position
|
static <S extends MessageSchema<S>> |
setBlobTailPosition(Pipe<S> pipe,
int value)
Direct access to set blob tail position
|
static <S extends MessageSchema<S>> |
setBlobWorkingHead(Pipe<S> pipe,
int value)
Direct access method for setting blob working head position
|
static <S extends MessageSchema<S>> |
setBlobWorkingTail(Pipe<S> pipe,
int value)
Direct method to set the blob working tail.
|
static <S extends MessageSchema<S>> |
setByteArrayWithMask(Pipe<S> outputRing,
int mask,
int len,
byte[] data,
int offset,
long slabPosition)
Set byte array into specific location
|
static <S extends MessageSchema<S>> |
setBytesTail(Pipe<S> pipe,
int value)
Deprecated.
|
static <S extends MessageSchema<S>> |
setConsumerRegulation(Pipe<S> pipe,
int msgPerMs,
int msgSize)
Set the regulator value for the consumer of the pipe.
|
static <S extends MessageSchema<S>> |
setIntValue(int value,
Pipe<S> pipe,
long position)
Writes int value to specific position in the given pipe
|
static <S extends MessageSchema<S>> |
setMaxPublishBatchSize(Pipe<S> pipe)
Sets the publish batch size to the max supported by the pipe.
|
static <S extends MessageSchema<S>> |
setMaxReleaseBatchSize(Pipe<S> pipe)
Sets the release batch size to the max supported by the pipe.
|
static <S extends MessageSchema<S>> |
setProducerRegulation(Pipe<S> pipe,
int msgPerMs,
int msgSize)
Set the regulator value for the producer of the pipe.
|
static <S extends MessageSchema<S>> |
setPublishBatchSize(Pipe<S> pipe,
int size)
sets specific batch publish size, publishes do not occur when called for but only when the
size count of publishes is reached.
|
static <S extends MessageSchema<S>> |
setReleaseBatchSize(Pipe<S> pipe,
int size)
sets specific batch release size, releases do not occur when called for but only when the
size count of releases is reached.
|
static void |
setThreadCallerLookup(ThreadBasedCallerLookup callerLookup)
Holds the thread caller for internal bookkeeping.
|
static <S extends MessageSchema<S>> |
setValue(int[] buffer,
int mask,
long offset,
int value)
set an int value at this position
|
static <S extends MessageSchema<S>> |
setWorkingHead(Pipe<S> pipe,
long value)
Directly set the new working head position for the slab
|
static <S extends MessageSchema<S>> |
setWorkingTailPosition(Pipe<S> pipe,
long value)
Direct access to set the working tail position
|
static <S extends MessageSchema<S>> |
shutdown(Pipe<S> pipe)
shutdown this pipe now, this should only be called by internal logic for an emergency
|
static <S extends MessageSchema<S>> |
sizeOf(Pipe<S> pipe,
int msgIdx)
returns size of this message as defined in the FROM and schema in this pipe.
|
static <S extends MessageSchema<S>> |
sizeOf(S schema,
int msgIdx)
returns size of this message as defined in the provided schema.
|
static <S extends MessageSchema<S>> |
skipNextFragment(Pipe<S> pipe)
skip over the next fragment and position for reading after that fragment
|
static <S extends MessageSchema<S>> |
skipNextFragment(Pipe<S> pipe,
int msgIdx)
Skips over specified section of the pipe
|
static <S extends MessageSchema<S>> |
slab(Pipe<S> pipe)
Direct access to slab backing array
|
static <S extends MessageSchema<S>> |
slabMask(Pipe<S> pipe)
Direct access to the mask for looping the slab
|
static <S extends MessageSchema<S>> |
spinWork(Pipe<S> pipe)
Only use this if you know what you are doing, eg we have enough threads.
|
static int[] |
splitGroups(int groups,
int fullLen)
matching the above splitPipes logic this method produces an inverse lookup array to determine group given a single index.
|
static <S extends MessageSchema<S>> |
splitPipes(int pipeCount,
Pipe<S>[] pipes)
Evenly split array of pipes across pipeCount arrays of arrays of pipes.
|
static int |
storeBlobWorkingHeadPosition(Pipe<?> target)
Store working head position for use later when field position is written
|
static <S extends MessageSchema<S>> |
storeUnpublishedWrites(Pipe<S> pipe)
Store the writes for publish later.
|
static StructRegistry |
structRegistry(Pipe p)
Returns the struct registry held by this pipe
|
static void |
structRegistry(Pipe p,
StructRegistry recordTypeData)
Store the StructRegistry and associate it with this pipe
|
static void |
sumWrittenFragments(Pipe<?> p,
long sum)
Called to accumulate total fragments written to this pipe
|
static <S extends MessageSchema<S>> |
tailPosition(Pipe<S> pipe)
Direct access to the published tail position
|
static <S extends MessageSchema<S>> |
takeByteArrayLength(Pipe<S> pipe)
consume the length for the var length byte field
|
static <S extends MessageSchema<S>> |
takeByteArrayMetaData(Pipe<S> pipe)
Consume the meta data for the var length byte field.
|
static <S extends MessageSchema<S>> |
takeInt(Pipe<S> pipe)
Read int and move the cursor forward
|
static <S extends MessageSchema<S>> |
takeLong(Pipe<S> pipe)
Read the long position and move the cursor forward.
|
static <S extends MessageSchema<S>> |
takeMsgIdx(Pipe<S> pipe)
Gets the index of a message in the pipe
|
static <S extends MessageSchema<S>> |
takeOptionalLong(Pipe<S> pipe)
Take optional Long which may be null.
|
static <S extends MessageSchema<S>> |
takeOptionalLong(Pipe<S> pipe,
long absent64Value)
Take optional Long which may be null.
|
static <S extends MessageSchema<S>> |
takeOptionalValue(Pipe<S> pipe)
take optional Integer, this may be null.
|
static <S extends MessageSchema<S>> |
takeOptionalValue(Pipe<S> pipe,
int absent32Value)
take optional Integer, this may be null.
|
static <S extends MessageSchema<S>> |
takeRingByteLen(Pipe<S> pipe)
Deprecated.
|
static <S extends MessageSchema<S>> |
takeRingByteMetaData(Pipe<S> pipe)
Deprecated.
|
static <S extends MessageSchema<S>> |
takeValue(Pipe<S> pipe)
Deprecated.
|
String |
toString()
Helpful user readable summary of the pipe.
|
long |
totalBlobBytesRead()
total bytes consumed by this fragment
|
static <S extends MessageSchema> |
totalPipes()
Total count of all pipes in the system.
|
static long |
totalWrittenFragments(Pipe<?> p)
Returns the total count of all fragments written to this pipe since creation.
|
static <S extends MessageSchema<S>> |
tryReplication(Pipe<S> pipe,
long historicSlabPosition,
int historicBlobPosition)
Replicate slab and blob data from an older fragment inside this same pipe up to the end.
|
static int |
unstoreBlobWorkingHeadPosition(Pipe<?> target)
Clear the stored blob working head position since we are writing it to the slab.
|
static <S extends MessageSchema<S>> |
validateBatchSize(Pipe<S> pipe,
int size)
Validate batch size is not too large
|
static <S extends MessageSchema<S>> |
validateFieldCount(Pipe<S> pipe)
Used by assert any time we need to check the validity of what has been written to the pipe.
|
static <S extends MessageSchema<S>> |
validatePipeBlobHasDataToRead(Pipe<S> pipe,
int blobPos,
int length)
Checks blob to see if there is data to read
|
static <S extends MessageSchema<S>> |
validateVarLength(Pipe<S> pipe,
int length)
Confirm that the bytes written are less than the space available.
|
static <S extends MessageSchema<S>> |
workingHeadPosition(Pipe<S> pipe)
Direct access to the working head position of the slab
|
static <S extends MessageSchema<S>> |
wrappedBlobConstBuffer(Pipe<S> pipe)
Wrapped constant buffer as ByteBuffer
|
static <S extends MessageSchema<S>> |
wrappedBlobReadingRingA(Pipe<S> pipe,
int meta,
int len)
Wrapped byte buffer for reading the backing ring.
|
static <S extends MessageSchema<S>> |
wrappedBlobReadingRingB(Pipe<S> pipe,
int meta,
int len)
Wrapped byte buffer for reading the backing ring.
|
static <S extends MessageSchema<S>> |
wrappedBlobRingA(Pipe<S> pipe)
Wrapped blob as a ByteBuffer
|
static <S extends MessageSchema<S>> |
wrappedBlobRingB(Pipe<S> pipe)
Wrapped blob as a ByteBuffer
|
static <S extends MessageSchema<S>> |
wrappedReadingBuffers(Pipe<S> pipe,
int meta,
int len)
Wrapped byte buffer array of 2 for reading the backing ring.
|
static <S extends MessageSchema<S>> |
wrappedSlabRing(Pipe<S> pipe)
Wrapped slab as an IntBuffer
|
static <S extends MessageSchema<S>> |
wrappedWritingBuffers(int originalBlobPosition,
Pipe<S> output)
ByteBuffers which wrap the backing blob array as 2 buffers
|
static <S extends MessageSchema<S>> |
wrappedWritingBuffers(int originalBlobPosition,
Pipe<S> output,
int maxLen)
ByteBuffers which wrap the backing blob array as 2 buffers
|
static <S extends MessageSchema<S>> |
wrappedWritingBuffers(Pipe<S> output)
ByteBuffers which wrap the backing blob array as 2 buffers
|
static <S extends MessageSchema<S>> |
writeFieldToOutputStream(Pipe<S> pipe,
OutputStream out)
Read this var len field and write its contents to the target OutputStream
|
static <S extends MessageSchema<S>> |
writeTrailingCountOfBytesConsumed(Pipe<S> pipe)
Records the count of bytes consumed by this fragment into the pipe.
|
static void |
xorBytesToBytes(byte[] source,
int sourceIdx,
int sourceMask,
byte[] target,
int targetIdx,
int targetMask,
int count)
Xor target bytes in place with the source bytes
|
static void |
xorRandomToBytes(Random r,
byte[] target,
int targetIdx,
int count,
int targetMask)
Write xor random data into the target array
|
public static final int RELATIVE_POS_MASK
public static final int STRUCTURED_POS_MASK
public static final int BYTES_WRAP_MASK
public static final int EOF_SIZE
public final int id
public final int sizeOfSlabRing
public final int sizeOfBlobRing
public final int slabMask
public final int blobMask
public final byte bitsOfSlabRing
public final byte bitsOfBlogRing
public final int maxVarLen
public byte[] blobRing
protected final byte[] blobConstBuffer
public int lastMsgIdx
public Pipe(PipeConfig<T> config)
config - reusable PipeConfig for creating many identical pipes.public Pipe(PipeConfig<T> config, boolean usingHighLevelAPI)
config - reusable PipeConfig for creating many identical pipes.usingHighLevelAPI - boolean used to turn off high level if its not used.public static void addPubListener(Pipe p, PipePublishListener listener)
p - pipe to be usedlistener - pub listener to addpublic static void removePubListener(Pipe p, PipePublishListener listener)
p - pipe to be usedlistener - pub listener to removepublic static void structRegistry(Pipe p, StructRegistry recordTypeData)
p - pipe holding registryrecordTypeData - registry to be storedpublic static StructRegistry structRegistry(Pipe p)
p - source pipe holding the registrypublic static void setThreadCallerLookup(ThreadBasedCallerLookup callerLookup)
callerLookup - object holding the coller id.public static long totalWrittenFragments(Pipe<?> p)
p - pipe with countpublic static void sumWrittenFragments(Pipe<?> p, long sum)
p - pipe to accumulatesum - total count to be added for this callpublic void creationStack()
public static <S extends MessageSchema<S>> boolean isInBlobFieldWrite(Pipe<S> pipe)
pipe - writingpublic long totalBlobBytesRead()
public void openBlobFieldWrite()
public void closeBlobFieldWrite()
public static <S extends MessageSchema<S>> boolean isRateLimitedConsumer(Pipe<S> pipe)
pipe - which is rate limitedpublic static <S extends MessageSchema<S>> boolean isRateLimitedProducer(Pipe<S> pipe)
pipe - which is rate limitedpublic static <S extends MessageSchema<S>> long computeRateLimitConsumerDelay(Pipe<S> pipe)
public static <S extends MessageSchema<S>> long computeRateLimitProducerDelay(Pipe<S> pipe)
public static <S extends MessageSchema<S>,T extends MessageSchema<T>> boolean isForSchema(Pipe<S> pipe, T schema)
pipe - to check schemaschema - MessageSchema instance typepublic static <S extends MessageSchema<S>,T extends MessageSchema<T>> boolean isForSchema(Pipe<S> pipe, Class<T> schema)
pipe - to check schemaschema - MessageSchema classpublic static <S extends MessageSchema<S>,T extends MessageSchema<T>> boolean isForSameSchema(Pipe<S> pipeA, Pipe<T> pipeB)
pipeA - pipe with a schema SpipeB - pipe with a schema Tpublic static <S extends MessageSchema<S>> boolean isForDynamicSchema(Pipe<S> pipe)
pipe - to be checkedpublic static <S extends MessageSchema<S>> long estBytesAllocated(Pipe<S> pipe)
pipe - to be checkedpublic static <S extends MessageSchema<S>> String schemaName(Pipe<S> pipe)
pipe - to be checkedpublic static <S extends MessageSchema<S>> void replayUnReleased(Pipe<S> pipe)
pipe - with unreleased fragments to be replayed.public static <S extends MessageSchema<S>> boolean isReplaying(Pipe<S> pipe)
pipe - the ringBuffer to check.true if the ringBuffer is replaying, false if it is not.public static <S extends MessageSchema<S>> void cancelReplay(Pipe<S> pipe)
pipe - ringBuffer to cancel replaypublic static <S extends MessageSchema<S>> int blobIndexBasePosition(Pipe<S> pipe)
pipe - where the index is written.public static <S extends MessageSchema<S>> void batchAllReleases(Pipe<S> pipe)
pipe - to have releases batchedpublic static <S extends MessageSchema<S>> void setReleaseBatchSize(Pipe<S> pipe, int size)
pipe - to have releases batchedsize - count of fragments to batch before release.public static <S extends MessageSchema<S>> void setPublishBatchSize(Pipe<S> pipe, int size)
pipe - to have publishes batchedsize - count of fragments to batch befoer publishpublic static <S extends MessageSchema<S>> int getPublishBatchSize(Pipe<S> pipe)
pipe - with batched published countpublic static <S extends MessageSchema<S>> int getReleaseBatchSize(Pipe<S> pipe)
pipe - with batched release countpublic static <S extends MessageSchema<S>> void setMaxPublishBatchSize(Pipe<S> pipe)
pipe - to have publishes batched.public static <S extends MessageSchema<S>> void setMaxReleaseBatchSize(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> int bytesWriteBase(Pipe<S> pipe)
pipe - holding bytes writtenpublic static <S extends MessageSchema<S>> void markBytesWriteBase(Pipe<S> pipe)
pipe - to have base markedpublic static <S extends MessageSchema<S>> int bytesReadBase(Pipe<S> pipe)
pipe - to read base frompublic static <S extends MessageSchema<S>> void markBytesReadBase(Pipe<S> pipe, int bytesConsumed)
pipe - reading frombytesConsumed - int total for this readpublic static <S extends MessageSchema<S>> void markBytesReadBase(Pipe<S> pipe)
pipe - reading frompublic String toString()
public PipeConfig<T> config()
public static <S extends MessageSchema> int totalPipes()
public Pipe<T> initBuffers()
public static <S extends MessageSchema<S>> void setConsumerRegulation(Pipe<S> pipe, int msgPerMs, int msgSize)
pipe - to be regulatedmsgPerMs - messages per msmsgSize - size of messages regulatedpublic static <S extends MessageSchema<S>> void setProducerRegulation(Pipe<S> pipe, int msgPerMs, int msgSize)
pipe - to be regulatedmsgPerMs - messages per msmsgSize - size of messages regulatedprotected DataInputBlobReader<T> createNewBlobReader()
protected DataOutputBlobWriter<T> createNewBlobWriter()
public static <S extends MessageSchema<S>> boolean isInit(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> boolean validateVarLength(Pipe<S> pipe, int length)
pipe - to be checked.length - written in bytespublic void reset()
public void reset(int structuredPos,
int unstructuredPos)
structuredPos - public static void releaseReadsBatched(Pipe<MessageSchemaDynamic> pipe)
pipe - to have publications released.public static <S extends MessageSchema<S>> int copyFragment(Pipe<S> source, Pipe<S> target)
public static Pipe[] buildPipes(PipeConfig[] configs)
configs - array of PipeConfig valuespublic static <S extends MessageSchema<S>> Pipe<S>[] buildPipes(int count, PipeConfig<S> commonConfig)
count - of new Pipe instances createdcommonConfig - PipeConfig used for all the new pipespublic static <S extends MessageSchema<S>> boolean validatePipeBlobHasDataToRead(Pipe<S> pipe, int blobPos, int length)
pipe - pipe to checkblobPos - position of bloblength - length of blobpublic static <S extends MessageSchema<S>> int addIntAsASCII(Pipe<S> output, int value)
S - MessageSchema to extendoutput - pipe to write tovalue - int to write as ASCIIpublic static <S extends MessageSchema<S>> int addRationalAsASCII(Pipe<S> pipe, long numerator, long denominator)
pipe - where ascii is writtennumerator - of rational to writedenominator - of rational to writepublic static <S extends MessageSchema<S>> int addLongAsASCII(Pipe<S> output, long value)
S - MessageSchema to extendoutput - pipe to write tovalue - long to write as ASCIIpublic static <S extends MessageSchema<S>> int addLongAsUTF8(Pipe<S> digitBuffer, long length)
S - MessageSchema to extenddigitBuffer - Pipe referencelength - length of long to addpublic static <S extends MessageSchema<S>> int addLongAsUTF8(Pipe<S> digitBuffer, int length)
digitBuffer - Pipe referencelength - length of int to addpublic static <S extends MessageSchema<S>> Pipe<S>[][] splitPipes(int pipeCount, Pipe<S>[] pipes)
pipeCount - int target count of groupspipes - array of pipes to be splitpublic static int[] splitGroups(int groups,
int fullLen)
groups - fullLen - public static <S extends MessageSchema<S>> void writeFieldToOutputStream(Pipe<S> pipe, OutputStream out) throws IOException
pipe - to read fromout - OutputStream to write data toIOExceptionpublic static boolean readFieldFromInputStream(Pipe pipe, InputStream inputStream, int byteCount) throws IOException
pipe - data is written intoinputStream - InputStream to read data frombyteCount - of bytes to be readIOExceptionpublic static <S extends MessageSchema<S>> ByteBuffer[] wrappedWritingBuffers(Pipe<S> output)
output - Pipe targetpublic static <S extends MessageSchema<S>> ByteBuffer[] wrappedWritingBuffers(int originalBlobPosition, Pipe<S> output)
originalBlobPosition - int position of byte dataoutput - Pipe targetpublic static <S extends MessageSchema<S>> ByteBuffer[] wrappedWritingBuffers(int originalBlobPosition, Pipe<S> output, int maxLen)
originalBlobPosition - int position of byte dataoutput - Pipe targetmaxLen - int length which could be writtenpublic static <S extends MessageSchema<S>> void moveBlobPointerAndRecordPosAndLength(int len, Pipe<S> output)
len - int length of bytes writtenoutput - Pipe targetpublic static <S extends MessageSchema<S>> void moveBlobPointerAndRecordPosAndLength(int originalBlobPosition, int len, Pipe<S> output)
originalBlobPosition - int head position where the write startedlen - int length of bytes writtenoutput - Pipe targetpublic static <S extends MessageSchema<S>> ByteBuffer wrappedBlobReadingRingA(Pipe<S> pipe, int meta, int len)
pipe - Pipe source pipemeta - int backing meta datalen - int length to be readpublic static <S extends MessageSchema<S>> ByteBuffer wrappedBlobReadingRingB(Pipe<S> pipe, int meta, int len)
pipe - Pipe source pipemeta - int backing meta datalen - int length to be readpublic static <S extends MessageSchema<S>> ByteBuffer[] wrappedReadingBuffers(Pipe<S> pipe, int meta, int len)
pipe - Pipe source pipemeta - int backing meta datalen - int length to be readpublic static int convertToUTF8(char[] charSeq,
int charSeqOff,
int charSeqLength,
byte[] targetBuf,
int targetIdx,
int targetMask)
charSeq - backing array of charscharSeqOff - offset where to consume charscharSeqLength - length of chars to consumetargetBuf - target arraytargetIdx - offset where to start writingtargetMask - mask for looping the target bufferpublic static int convertToUTF8(CharSequence charSeq, int charSeqOff, int charSeqLength, byte[] targetBuf, int targetIdx, int targetMask)
charSeq - CharSequence source charscharSeqOff - source offset to read fromcharSeqLength - source length to readtargetBuf - target arraytargetIdx - offset where to start writingtargetMask - mask for looping the target bufferpublic static <S extends MessageSchema<S>> void appendFragment(Pipe<S> input, Appendable target, int fragIdx)
input - Pipe sourcetarget - Appendable to write textfragIdx - fragment idxpublic static <S extends MessageSchema<S>> ByteBuffer readBytes(Pipe<S> pipe, ByteBuffer target, int meta, int len)
pipe - Pipe sourcetarget - ByteBuffer written intometa - int field meta datalen - int field length in bytespublic static <S extends MessageSchema<S>> DataOutputBlobWriter<?> readBytes(Pipe<S> pipe, DataOutputBlobWriter<?> target, int meta, int len)
pipe - Pipe sourcetarget - DataOutputBlobWriter field to write intometa - int field meta datalen - int field length in bytespublic static <S extends MessageSchema<S>> DataOutputBlobWriter<?> readBytes(Pipe<S> pipe, DataOutputBlobWriter<?> target)
pipe - Pipe sourcetarget - DataOutputBlobWriter field written intopublic static <S extends MessageSchema<S>> void readBytes(Pipe<S> pipe, byte[] target, int targetIdx, int targetMask, int meta, int len)
pipe - to read fromtarget - array to checktargetIdx - index to checkpublic static <S extends MessageSchema<S>,A extends Appendable> A readASCII(Pipe<S> pipe, A target, int meta, int len)
pipe - to read fromtarget - area to read fromlen - length of area to read frompublic static <S extends MessageSchema<S>,A extends Appendable> A readOptionalASCII(Pipe<S> pipe, A target, int meta, int len)
pipe - Pipe sourcetarget - Appendable destinationmeta - int meta data for the fieldlen - int length for the fieldpublic static <S extends MessageSchema<S>> void skipNextFragment(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> void skipNextFragment(Pipe<S> pipe, int msgIdx)
pipe - that you're reading frommsgIdx - int fragment idx already read of the current fragment to be skippedpublic static <S extends MessageSchema<S>> boolean isEqual(Pipe<S> pipe, CharSequence charSeq, int meta, int len)
pipe - used in comparisoncharSeq - CharSequence to comparemeta - TODO: ??len - TODO: ??public static <S extends MessageSchema<S>> boolean isEqual(Pipe<S> pipe, byte[] expected, int expectedPos, int meta, int len)
pipe - Pipe sourceexpected - byte[] backing arrayexpectedPos - int position in backing arraymeta - int field meta datalen - int length of fieldpublic static boolean isEqual(byte[] aBack,
int aPos,
int aMask,
byte[] bBack,
int bPos,
int bMask,
int len)
aBack - byte[] backing arrayaPos - int position to read from in backing array aaMask - int mask for looping backing array abBack - byte[] backing arraybPos - int position to read from in backing array bbMask - int mask for looping backing array blen - int length of segmentpublic static <S extends MessageSchema<S>,A extends Appendable> A readUTF8(Pipe<S> pipe, A target, int meta, int len)
S - MessageSchema to extendA - Appendable to extendpipe - pipe to read fromtarget - section of pipe to read fromlen - number of characters to readpublic static <S extends MessageSchema<S>> Appendable readOptionalUTF8(Pipe<S> pipe, Appendable target, int meta, int len)
pipe - Pipe sourcetarget - Appendable destinationmeta - int meta data for the fieldlen - int length for the fieldpublic static <S extends MessageSchema<S>> void addDecimalAsASCII(int readDecimalExponent, long readDecimalMantissa, Pipe<S> outputRing)
S - MessageSchema to write toreadDecimalExponent - int exponent -63 to +64 where the point goesreadDecimalMantissa - long actual value for the numberoutputRing - Pipe to write topublic static int safeBlobPosAdd(int pos,
long value)
pos - int original positionvalue - long length to be addedpublic static <S extends MessageSchema<S>> int bytesOfContent(Pipe<S> ringBuffer)
ringBuffer - public static <S extends MessageSchema<S>> void validateBatchSize(Pipe<S> pipe, int size)
pipe - Pipe targetsize - int batch sizepublic static <S extends MessageSchema<S>> int computeMaxBatchSize(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> int computeMaxBatchSize(Pipe<S> pipe, int mustFit)
pipe - Pipe sourcemustFit - how many batches must fit on the pipepublic static <S extends MessageSchema<S>> boolean isEndOfPipe(Pipe<S> pipe, long tailPosition)
S - pipe to be checkedpipe - MessageSchema to be extendedtailPosition - position of assumed end of pipetrue if end of pipe reached, else falsepublic static void publishEOF(Pipe<?>[] pipe)
pipe - Pipe[] targetspublic static <S extends MessageSchema<S>> void publishEOF(Pipe<S> pipe)
pipe - Pipepublic static void copyBytesFromToRing(byte[] source,
int sourceloc,
int sourceMask,
byte[] target,
int targetloc,
int targetMask,
int length)
source - data to be copiedsourceloc - location of data to be copiedtargetloc - location to copy data topublic static void copyIntsFromToRing(int[] source,
int sourceloc,
int sourceMask,
int[] target,
int targetloc,
int targetMask,
int length)
source - data to be copiedsourceloc - location of data to be copiedtargetloc - location to copy data topublic static void copyBytesFromArrayToRing(byte[] source,
int sourceloc,
byte[] target,
int targetloc,
int targetMask,
int length)
source - byte[] source arraysourceloc - int source locationtarget - byte[] target arraytargetloc - int target locationtargetMask - int target mask for looping over target arraylength - int length in bytes to copypublic static <S extends MessageSchema<S>,T extends MessageSchema<T>> void addByteArray(Pipe<S> source, Pipe<T> target)
source - Pipe source positioned to the field to be copiedtarget - Pipe target positioned to where the field is to be written@Deprecated public static <S extends MessageSchema<S>> int leftConvertIntToASCII(Pipe<S> pipe, int value, int idx)
@Deprecated public static <S extends MessageSchema<S>> int leftConvertLongToASCII(Pipe<S> pipe, long value, int idx)
public static int readInt(int[] buffer,
int mask,
long index)
buffer - int[] source arraymask - int mask for positionindex - int offset to find intpublic static int readIntSecure(int[] buffer,
int mask,
long index,
int clearValue)
buffer - mask - index - clearValue - public static long readLong(int[] buffer,
int mask,
long index)
buffer - int[] backing buffer to read frommask - int ring buffer mask to loop over bufferindex - int position in byte arraypublic static long decodeUTF8Fast(byte[] source,
long posAndChar,
int mask)
source - byte[] source bytesposAndChar - long first position and char, normally high 32 are zeromask - int source maskpublic static <S extends MessageSchema<S>> int copyASCIIToBytes(CharSequence source, Pipe<S> pipe)
source - CharSequence char sourcepipe - Pipe target to write bytes fieldpublic static <S extends MessageSchema<S>> void addASCII(CharSequence source, Pipe<S> rb)
S - MessageSchema to extendsource - characters to writerb - pipe to write topublic static <S extends MessageSchema<S>> void addASCII(CharSequence source, int sourceIdx, int sourceCharCount, Pipe<S> pipe)
source - CharSequence charssourceIdx - position to start reading charssourceCharCount - count of chars to writepipe - Pipe target to add byte field intopublic static <S extends MessageSchema<S>> void addASCII(char[] source, int sourceIdx, int sourceCharCount, Pipe<S> pipe)
source - char[] char sourcesourceIdx - int start position of charssourceCharCount - int count of charspipe - Pipe target to write byte fieldpublic static <S extends MessageSchema<S>> int copyASCIIToBytes(CharSequence source, int sourceIdx, int sourceLen, Pipe<S> pipe)
source - CharSequence source charssourceIdx - start position of chars to readsourceLen - length of chars to readpipe - Pipe target pipepublic static <S extends MessageSchema<S>> int copyASCIIToBytes(char[] source, int sourceIdx, int sourceLen, Pipe<S> pipe)
source - char[] char sourcesourceIdx - int start position to read charssourceLen - int length to copypipe - Pipe target pipe to add fieldpublic static <S extends MessageSchema<S>> void addUTF8(CharSequence source, Pipe<S> rb)
S - MessageSchema to extendsource - characters to writerb - pipe to write topublic static <S extends MessageSchema<S>> void addUTF8(CharSequence source, int sourceCharCount, Pipe<S> pipe)
S - MessageSchema to extendsource - characters to writesourceCharCount - character count of the source to writepipe - pipe to write topublic static <S extends MessageSchema<S>> void addUTF8(char[] source, int sourceCharCount, Pipe<S> rb)
S - MessageSchema to extendsource - characters to writesourceCharCount - character count of the source to writerb - pipe to write topublic static <S extends MessageSchema<S>> int copyUTF8ToByte(CharSequence source, int sourceOffset, int sourceCharCount, Pipe<S> pipe)
source - CharSequence sourcesourceOffset - int start position for reading charssourceCharCount - count of chars to readpipe - Pipe targetpublic static int copyUTF8ToByte(CharSequence source, int sourceIdx, byte[] target, int targetMask, int targetIdx, int charCount)
source - CharSequence charssourceIdx - int start offset to read fromtarget - byte[] target byte arraytargetMask - int target mask for loopingtargetIdx - int target offsetcharCount - int count of chars to be convertedpublic static void xorRandomToBytes(Random r, byte[] target, int targetIdx, int count, int targetMask)
r - Random source for random valuestarget - byte[] backing target arraytargetIdx - int targetIdxcount - int length in bytestargetMask - ring buffer mask to loop over targetpublic static void xorBytesToBytes(byte[] source,
int sourceIdx,
int sourceMask,
byte[] target,
int targetIdx,
int targetMask,
int count)
source - byte[] source backing datasourceIdx - int source start positionsourceMask - int mask ring buffer source byte[]target - byte[] target backing arraytargetIdx - int target start xor positiontargetMask - int mask to loop back over target buffercount - int total count of bytes lengthpublic static <S extends MessageSchema<S>> int copyUTF8ToByte(char[] source, int sourceCharCount, Pipe<S> pipe)
source - char[] charssourceCharCount - count of chars from 0 positionpipe - Pipe target to write fieldpublic static <S extends MessageSchema<S>> int copyUTF8ToByte(char[] source, int sourceOffset, int sourceCharCount, Pipe<S> pipe)
source - char[] charssourceOffset - start position to read charssourceCharCount - total count of chars readpipe - Pipe target to write fieldpublic static <S extends MessageSchema<S>> int encodeSingleChar(int c, byte[] buffer, int mask, int pos)
c - int, single charbuffer - byte[] targetmask - int mask for looping ring buffer targetpos - int index in target to write bytespublic static <S extends MessageSchema<S>> void addByteBuffer(ByteBuffer source, Pipe<S> pipe)
source - ByteBuffer source with var datapipe - Pipe targetpublic static <S extends MessageSchema<S>> void addByteBuffer(ByteBuffer source, int length, Pipe<S> pipe)
source - ByteBuffer targetlength - int limits bytes from target byte bufferpipe - Pipe targetpublic static <S extends MessageSchema<S>> void copyByteBuffer(ByteBuffer source, int length, Pipe<S> pipe)
source - ByteBufferlength - int limits the bytes copied from the sourcepipe - Pipe target for writing the fieldpublic static <S extends MessageSchema<S>> void addByteArrayWithMask(Pipe<S> outputRing, int mask, int len, byte[] data, int offset)
outputRing - Pipe targetmask - int mask to loop arround data targetlen - int total bytes to copydata - byte[] backing arrayoffset - int bytes positionpublic static <S extends MessageSchema<S>> void setByteArrayWithMask(Pipe<S> outputRing, int mask, int len, byte[] data, int offset, long slabPosition)
outputRing - Pipe targetmask - int backing data masklen - int count of bytesdata - byte[] backing data to copyoffset - int start at position to copyslabPosition - int slab position to set this datapublic static <S extends MessageSchema<S>> int peek(int[] buf, long pos, int mask)
buf - int[] backing slap arraypos - int index position to read frommask - int mask for access to backing arraypublic static <S extends MessageSchema<S>> long peekLong(int[] buf, long pos, int mask)
buf - int[] backing slap arraypos - int index position to read frommask - int mask for access to backing arraypublic static <S extends MessageSchema<S>> boolean isShutdown(Pipe<S> pipe)
pipe - Pipe source to read frompublic static <S extends MessageSchema<S>> void shutdown(Pipe<S> pipe)
pipe - Pipe pipe to shutdownpublic static <S extends MessageSchema<S>> void addByteArray(byte[] source, Pipe<S> pipe)
S - MessageSchema to extendsource - byte array to writepipe - pipe to write topublic static <S extends MessageSchema<S>> void addByteArray(byte[] source, int sourceIdx, int sourceLen, Pipe<S> pipe)
S - MessageSchema to be extendedsource - byte array to writesourceIdx - index of the source arraysourceLen - length of the array to be written TODO: max length?pipe - pipe to be written topublic static <S extends MessageSchema<S>> void addByteArray(byte[] source, int sourceIdx, int sourceLen, int sourceMask, Pipe<S> pipe)
S - MessageSchema to be extendedsource - byte array to writesourceIdx - index of the source arraysourceLen - max? length of the array to be writtensourceMask - TODO: not sure of descriptionpipe - pipe to be written topublic static <S extends MessageSchema<S>> void addNullByteArray(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void addIntValue(int value, Pipe<S> pipe)
S - MessageSchema to extendvalue - int to be writtenpipe - pipe to be written topublic static <S extends MessageSchema<S>> void setIntValue(int value, Pipe<S> pipe, long position)
S - MessageSchema to extendvalue - int to be writtenpipe - pipe to be written toposition - position to write intpublic static <S extends MessageSchema<S>> void orIntValue(int value, Pipe<S> pipe, long position)
value - int to be oredpipe - Pipe to be written toposition - position to orpublic static <S extends MessageSchema<S>> int addMsgIdx(Pipe<S> pipe, int msgIdx)
pipe - Pipe targetmsgIdx - int message to be written, Find this value in the MessageSchema for the type in usepublic static <S extends MessageSchema<S>> void setValue(int[] buffer, int mask, long offset, int value)
buffer - int[] backing buffermask - int maskoffset - long offset into backing buffervalue - int value to be assigned to this positionpublic static <S extends MessageSchema<S>> void orValue(int[] buffer, int mask, long offset, int value)
buffer - int[] backing buffermask - int maskoffset - long offset into backing buffervalue - int value to be ored at this positionpublic static <S extends MessageSchema<S>> void addBytePosAndLen(Pipe<S> pipe, int position, int length)
S - MessageSchema to be extendedpipe - pipe to be written toposition - position of bytelength - length of bytepublic static <S extends MessageSchema<S>> void addBytePosAndLenSpecial(Pipe<S> targetOutput, int startBytePos, int bytesLength)
targetOutput - Pipe targetstartBytePos - int start position where the bytes were writtenbytesLength - int count length of bytes writtenpublic static <S extends MessageSchema<S>> int bytePosition(int meta, Pipe<S> pipe, int len)
meta - int pos and location data for thie fieldpipe - Pipe pipe holding this datalen - int length for this fieldpublic static <S extends MessageSchema<S>> int convertToPosition(int meta, Pipe<S> pipe)
meta - int metapipe - Pipe pipe holding this datapublic static <S extends MessageSchema> void addValue(int[] buffer, int mask, Pipe.PaddedLong headCache, int value1, int value2, int value3)
buffer - byte[] target backing arraymask - int mask to loop over ring bufferheadCache - head positionvalue1 - int value 1value2 - int value 2value3 - int value 3public static <S extends MessageSchema<S>> void addDecimal(int exponent, long mantissa, Pipe<S> pipe)
exponent - int exponent -63 to +63mantissa - long raw valuepipe - Pipe targetpublic static <S extends MessageSchema<S>> void addLongValue(long value, Pipe<S> pipe)
S - MessageSchema to be extendedvalue - long to be writtenpipe - pipe to be written topublic static <S extends MessageSchema<S>> void addLongValue(int[] buffer, int mask, Pipe.PaddedLong headCache, long value)
buffer - int[] target backing arraymask - int for looping over target bufferheadCache - PaddedLong position of headvalue - long valuepublic static <S extends MessageSchema<S>> int readByteArrayLength(int idx, Pipe<S> pipe)
idx - int position of fieldpipe - Pipe source pipepublic static <S extends MessageSchema<S>> int takeByteArrayLength(Pipe<S> pipe)
pipe - Pipe source@Deprecated public static <S extends MessageSchema<S>> int takeRingByteLen(Pipe<S> pipe)
public static <S extends MessageSchema<S>> byte[] byteBackingArray(int meta, Pipe<S> pipe)
meta - int meta valuepipe - Pipe source@Deprecated public static <S extends MessageSchema<S>> int readRingByteMetaData(int pos, Pipe<S> pipe)
public static <S extends MessageSchema<S>> int readByteArraMetaData(int pos, Pipe<S> pipe)
pos - int index positionpipe - Pipe source@Deprecated public static <S extends MessageSchema<S>> int takeRingByteMetaData(Pipe<S> pipe)
public static <S extends MessageSchema<S>> int takeByteArrayMetaData(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> int readIntValue(int idx, Pipe<S> pipe)
S - MessageSchema to extendidx - index to readpipe - pipe to read from@Deprecated public static <S extends MessageSchema<S>> int readValue(int idx, Pipe<S> pipe)
public static <S extends MessageSchema<S>> int takeInt(Pipe<S> pipe)
pipe - Pipe source@Deprecated public static <S extends MessageSchema<S>> int takeValue(Pipe<S> pipe)
public static <S extends MessageSchema<S>> int readIntValue(int[] backing, int mask, long position)
backing - int[] backing buffermask - int looping maskposition - int position index@Deprecated public static <S extends MessageSchema<S>> int readValue(int[] rbB, int rbMask, long rbPos)
public static <S extends MessageSchema<S>> Integer takeOptionalValue(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> Integer takeOptionalValue(Pipe<S> pipe, int absent32Value)
pipe - Pipe sourceabsent32Value - int value mapped to nullpublic static <S extends MessageSchema<S>> long takeLong(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> Long takeOptionalLong(Pipe<S> pipe)
pipe - Ping sourcepublic static <S extends MessageSchema<S>> Long takeOptionalLong(Pipe<S> pipe, long absent64Value)
pipe - Pipe sourceabsent64Value - long value mapped to nullpublic static <S extends MessageSchema<S>> long readLong(int idx, Pipe<S> pipe)
S - MessageSchema to extendidx - index to readpipe - pipe to read frompublic static <S extends MessageSchema<S>> int takeMsgIdx(Pipe<S> pipe)
pipe - pipe to checkpublic static <S extends MessageSchema<S>> boolean peekMsg(Pipe<S> pipe, int expected)
pipe - Pipe sourceexpected - int message idxpublic static <S extends MessageSchema<S>> boolean peekNotMsg(Pipe<S> pipe, int expected)
pipe - Pipe sourceexpected - int message idxpublic static <S extends MessageSchema<S>> boolean peekMsg(Pipe<S> pipe, int expected1, int expected2)
pipe - Pipe sourceexpected1 - int message idxexpected2 - int message idxpublic static <S extends MessageSchema<S>> boolean peekMsg(Pipe<S> pipe, int expected1, int expected2, int expected3)
pipe - Pipe sourceexpected1 - int message idxexpected2 - int message idxexpected3 - int message idxpublic static <S extends MessageSchema<S>> int peekInt(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> int peekInt(Pipe<S> pipe, int offset)
pipe - Pipe sourceoffset - int relative position of fieldpublic static <S extends MessageSchema<S>> long peekLong(Pipe<S> pipe, int offset)
pipe - Pipe sourceoffset - int relative position of fieldpublic static <S extends MessageSchema<S>,A extends Appendable> A peekUTF8(Pipe<S> pipe, int offset, A target)
pipe - Pipe sourceoffset - int relative position of fieldtarget - Appendable destination for textpublic static <S extends MessageSchema<S>> int contentRemaining(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> boolean isEmpty(Pipe<S> pipe)
S - MessageSchema to extendpipe - pipe to be checkedtrue if pipe has no data else falsepublic static <S extends MessageSchema<S>> int releaseReadLock(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> int readNextWithoutReleasingReadLock(Pipe<S> pipe)
pipe - Pipe target@Deprecated public static <S extends MessageSchema<S>> int releaseReads(Pipe<S> pipe)
public static <S extends MessageSchema<S>> void batchedReleasePublish(Pipe<S> pipe, int blobTail, long slabTail)
pipe - Pipe targetblobTail - int blobTail position to releaseslabTail - int slabTail postiion to releasepublic static <S extends MessageSchema<S>> void releaseAllBatchedReads(Pipe<S> pipe)
pipe - Pipe to be examinedpublic static <S extends MessageSchema<S>> void releaseBatchedReadReleasesUpToThisPosition(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void releaseBatchedReadReleasesUpToPosition(Pipe<S> pipe, long newTailToPublish, int newTailBytesToPublish)
pipe - Pipe targetnewTailToPublish - long new tailnewTailBytesToPublish - int new bytes totalpublic static <S extends MessageSchema<S>> int publishWrites(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> int writeTrailingCountOfBytesConsumed(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> int publishWrites(Pipe<S> pipe, int optionalHiddenTrailingBytes)
pipe - Pipe sourceoptionalHiddenTrailingBytes - int count of bytes to add after messagepublic static <S extends MessageSchema<S>> void notifyPubListener(Pipe<S> pipe)
pipe - Pipe observed pipepublic static <S extends MessageSchema<S>> void publishWritesBatched(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> boolean validateFieldCount(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void publishAllBatchedWrites(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> void publishHeadPositions(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void storeUnpublishedWrites(Pipe<S> pipe)
pipe - Pipe targepublic static <S extends MessageSchema<S>> void abandonWrites(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> void spinWork(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> int blobMask(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> int slabMask(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> long getSlabHeadPosition(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> long headPosition(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> long workingHeadPosition(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> void setWorkingHead(Pipe<S> pipe, long value)
pipe - Pipe targetvalue - long new head position for slabpublic static <S extends MessageSchema<S>> long addAndGetWorkingHead(Pipe<S> pipe, int inc)
pipe - Pipe targetinc - int step to increment head bypublic static <S extends MessageSchema<S>> long getWorkingTailPosition(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void setWorkingTailPosition(Pipe<S> pipe, long value)
pipe - Pipe targetvalue - long new working tail position.public static <S extends MessageSchema<S>> long addAndGetWorkingTail(Pipe<S> pipe, int inc)
pipe - Pipe targetinc - int step to increment working tailpublic static <S extends MessageSchema<S>> boolean tryReplication(Pipe<S> pipe, long historicSlabPosition, int historicBlobPosition)
pipe - Pipe sourcehistoricSlabPosition - long positionhistoricBlobPosition - int positionpublic static <S extends MessageSchema<S>> void publishWorkingHeadPosition(Pipe<S> pipe, long workingHeadPos)
pipe - workingHeadPos - public static <S extends MessageSchema<S>> long tailPosition(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void publishWorkingTailPosition(Pipe<S> pipe, long workingTailPos)
pipe - workingTailPos - public static <S extends MessageSchema<S>> void publishBlobWorkingTailPosition(Pipe<S> pipe, int blobWorkingTailPos)
pipe - Pipe targetblobWorkingTailPos - int new working tail position@Deprecated public static <S extends MessageSchema<S>> int primarySize(Pipe<S> pipe)
public static <S extends MessageSchema<S>> FieldReferenceOffsetManager from(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> int computeCountOfBytesConsumed(Pipe<S> pipe)
pipe - Pipe pipepublic static <S extends MessageSchema<S>> IntBuffer wrappedSlabRing(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> ByteBuffer wrappedBlobRingA(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> ByteBuffer wrappedBlobRingB(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> ByteBuffer wrappedBlobConstBuffer(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> DataOutputBlobWriter<S> outputStream(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> DataOutputBlobWriter<S> openOutputStream(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> DataInputBlobReader<S> inputStream(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> DataInputBlobReader<S> openInputStream(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> DataInputBlobReader<S> peekInputStream(Pipe<S> pipe, int offset)
pipe - Pipe targetoffset - int relative index to where this offset@Deprecated public static <S extends MessageSchema<S>> boolean roomToLowLevelWrite(Pipe<S> pipe, int size)
public static <S extends MessageSchema<S>> boolean hasRoomForWrite(Pipe<S> pipe, int size)
pipe - Pipe targetsize - int size from as defined in FROMpublic static <S extends MessageSchema<S>> void presumeRoomForWrite(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> boolean hasRoomForWrite(Pipe<S> pipe)
S - MessageSchema to extendpipe - pipe to examinetrue if pipe has room to write else falsepublic static <S extends MessageSchema<S>> long confirmLowLevelWrite(Pipe<S> output, int size)
output - Pipe targetsize - int size of fragment as defined in FROM, also returned when addMsgIdx is calledpublic static <S extends MessageSchema<S>> long confirmLowLevelWriteUnchecked(Pipe<S> output, int size)
output - Pipe targetsize - int size of fragment as defined in FROM, also returned when addMsgIdx is calledpublic static <S extends MessageSchema<S>> long confirmLowLevelWrite(Pipe<S> output)
output - public static <S extends MessageSchema<S>> int lastConfirmedWritePosition(Pipe<S> output)
output - Pipe targetpublic static <S extends MessageSchema<S>> boolean hasContentToRead(Pipe<S> pipe, int size)
pipe - Pipe sourcesize - int message size looking forpublic static <S extends MessageSchema<S>> boolean hasContentToRead(Pipe<S> pipe)
S - MessageSchema to extendpipe - pipe to be examinedtrue if there is data to read else falsepublic static <S extends MessageSchema<S>> long confirmLowLevelRead(Pipe<S> pipe, long size)
pipe - Pipe targetsize - long size as defined in FROMpublic static <S extends MessageSchema<S>> int getBlobTailPosition(Pipe<S> pipe)
pipe - Pipe source@Deprecated public static <S extends MessageSchema<S>> int getBlobRingTailPosition(Pipe<S> pipe)
public static <S extends MessageSchema<S>> void setBlobTailPosition(Pipe<S> pipe, int value)
pipe - Pipe targetvalue - int tail position@Deprecated public static <S extends MessageSchema<S>> void setBytesTail(Pipe<S> pipe, int value)
public static <S extends MessageSchema<S>> int getBlobHeadPosition(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void setBlobHeadPosition(Pipe<S> pipe, int value)
pipe - Pipe targetvalue - int new positionpublic static <S extends MessageSchema<S>> int addAndGetBlobHeadPosition(Pipe<S> pipe, int inc)
pipe - Pipe targetinc - value to incrementpublic static <S extends MessageSchema<S>> int getWorkingBlobTailPosition(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> int addAndGetBlobWorkingTailPosition(Pipe<S> pipe, int inc)
pipe - Pipe targetinc - value to addpublic static <S extends MessageSchema<S>> void setBlobWorkingTail(Pipe<S> pipe, int value)
pipe - Pipe targetvalue - int working tail positionpublic static <S extends MessageSchema<S>> int getWorkingBlobHeadPosition(Pipe<S> pipe)
pipe - Pipe source@Deprecated public static <S extends MessageSchema<S>> int getBlobWorkingHeadPosition(Pipe<S> pipe)
public static <S extends MessageSchema<S>> int addAndGetBlobWorkingHeadPosition(Pipe<S> pipe, int inc)
pipe - Pipe targetinc - step to addpublic static <S extends MessageSchema<S>> void setBlobWorkingHead(Pipe<S> pipe, int value)
pipe - Pipe targetvalue - int working head positionpublic static <S extends MessageSchema<S>> int decBatchRelease(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> int decBatchPublish(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void beginNewReleaseBatch(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void beginNewPublishBatch(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> byte[] blob(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> int[] slab(Pipe<S> pipe)
pipe - Pipe source@Deprecated public static <S extends MessageSchema<S>> byte[] byteBuffer(Pipe<S> pipe)
@Deprecated public static <S extends MessageSchema<S>> int[] primaryBuffer(Pipe<S> pipe)
public static <S extends MessageSchema<S>> Pipe.PaddedLong getWorkingTailPositionObject(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> Pipe.PaddedLong getWorkingHeadPositionObject(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> int sizeOf(Pipe<S> pipe, int msgIdx)
pipe - Pipe sourcemsgIdx - int message idxpublic static <S extends MessageSchema<S>> int sizeOf(S schema, int msgIdx)
schema - MessageSchema holding the FROMmsgIdx - int message idxpublic static <S extends MessageSchema<S>> void releasePendingReadLock(Pipe<S> pipe)
pipe - Pipe targetpublic static <S extends MessageSchema<S>> void releasePendingAsReadLock(Pipe<S> pipe, int consumed)
pipe - Pipe targetconsumed - int bytes consumed so far allowing these fragments to be released.public static <S extends MessageSchema<S>> int releasePendingCount(Pipe<S> pipe)
pipe - Pipe sourcepublic static <S extends MessageSchema<S>> int releasePendingByteCount(Pipe<S> pipe)
pipe - public static <S extends MessageSchema<S>> void releaseAllPendingReadLock(Pipe<S> pipe)
pipe - public static void markHead(Pipe pipe)
pipe - pipe to be usedpublic static void resetHead(Pipe pipe)
pipe - pipe to be usedpublic static void markTail(Pipe pipe)
pipe - public static void resetTail(Pipe pipe)
pipe - public static int storeBlobWorkingHeadPosition(Pipe<?> target)
target - public static int unstoreBlobWorkingHeadPosition(Pipe<?> target)
target - Copyright © 2018. All Rights Reserved.