public final class TermScanner
extends java.lang.Object
This can be used to concurrently read a term buffer which is being appended to.
Constructor and Description |
---|
TermScanner() |
Modifier and Type | Method and Description |
---|---|
static int |
available(long result)
The number of bytes that are available to be read after a scan.
|
static long |
pack(int padding,
int available)
Pack the values for available and padding into a long for returning on the stack.
|
static int |
padding(long result)
The count of bytes that should be added for padding to the position on top of what is available.
|
static long |
scanForAvailability(org.agrona.concurrent.UnsafeBuffer termBuffer,
int offset,
int maxLength)
Scan the term buffer for availability of new message fragments from a given offset up to a maxLength of bytes.
|
public static long scanForAvailability(org.agrona.concurrent.UnsafeBuffer termBuffer, int offset, int maxLength)
termBuffer
- to be scanned for new message fragments.offset
- at which the scan should begin.maxLength
- in bytes of how much should be scanned.public static long pack(int padding, int available)
padding
- value to be packed.available
- value to be packed.public static int available(long result)
result
- into which the padding value has been packed.public static int padding(long result)
result
- into which the padding value has been packed.Copyright © 2014-2018 Real Logic Ltd. All Rights Reserved.