public class GridGgfsFileAffinityRange extends org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapter implements Externalizable
| Modifier and Type | Field and Description |
|---|---|
static int |
RANGE_STATUS_INITIAL
Initial range status, right after creation.
|
static int |
RANGE_STATUS_MOVED
Fragmentizer finished block copy for this range.
|
static int |
RANGE_STATUS_MOVING
Moving range state.
|
BIT_SET_NOT_READ, BOOLEAN_ARR_NOT_READ, BYTE_ARR_LIST_NOT_READ, BYTE_ARR_NOT_READ, CACHE_VER_NOT_READ, CHAR_ARR_NOT_READ, CLOCK_DELTA_VER_NOT_READ, commState, DHT_PART_EXCHANGE_ID_NOT_READ, DOUBLE_ARR_NOT_READ, DR_INT_REQ_ENTRY_NOT_READ, ENUM_NOT_READ, FLOAT_ARR_NOT_READ, GRID_UUID_NOT_READ, INT_ARR_NOT_READ, LONG_ARR_NOT_READ, LONG_LIST_NOT_READ, MSG_NOT_READ, NULL, SHORT_ARR_NOT_READ, STR_NOT_READ, UUID_NOT_READ, VAL_BYTES_NOT_READ| Constructor and Description |
|---|
GridGgfsFileAffinityRange()
Empty constructor required by
Externalizable. |
| Modifier and Type | Method and Description |
|---|---|
org.gridgain.grid.GridUuid |
affinityKey() |
boolean |
belongs(long blockStartOff) |
org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapter |
clone() |
protected void |
clone0(org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapter _msg) |
GridGgfsFileAffinityRange |
concat(GridGgfsFileAffinityRange range)
Tries to concatenate this range with a given one.
|
byte |
directType() |
boolean |
done() |
boolean |
empty() |
long |
endOffset() |
void |
expand(long blockStartOff,
int expansionSize)
Expands this range by given block.
|
boolean |
greater(long blockStartOff) |
boolean |
less(long blockStartOff) |
void |
markDone()
Marks this range as done.
|
void |
readExternal(ObjectInput in) |
boolean |
readFrom(ByteBuffer buf) |
boolean |
regionEqual(GridGgfsFileAffinityRange other)
Checks if range regions are equal.
|
Collection<GridGgfsFileAffinityRange> |
split(long maxSize)
Splits range into collection if smaller ranges with length equal to
maxSize. |
long |
startOffset() |
int |
status() |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
boolean |
writeTo(ByteBuffer buf) |
public static final int RANGE_STATUS_INITIAL
public static final int RANGE_STATUS_MOVING
public static final int RANGE_STATUS_MOVED
public GridGgfsFileAffinityRange()
Externalizable.public org.gridgain.grid.GridUuid affinityKey()
public long startOffset()
public long endOffset()
public boolean belongs(long blockStartOff)
blockStartOff - Block start offset to check.True if block with given start offset belongs to this range.public boolean less(long blockStartOff)
blockStartOff - Block start offset to check.True if block with given start offset is located before this range.public boolean greater(long blockStartOff)
blockStartOff - Block start offset to check.True if block with given start offset is located after this range.public boolean empty()
public int status()
public void expand(long blockStartOff,
int expansionSize)
blockStartOff - Offset of block start.expansionSize - Block size.public Collection<GridGgfsFileAffinityRange> split(long maxSize)
maxSize.maxSize - Split part maximum size.@Nullable public GridGgfsFileAffinityRange concat(GridGgfsFileAffinityRange range)
null.range - Range to concatenate with.null if ranges are not adjacent.public void markDone()
public boolean done()
public boolean regionEqual(GridGgfsFileAffinityRange other)
other - Other range to check against.True if range regions are equal.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapter clone()
clone in class org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapterprotected void clone0(org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapter _msg)
clone0 in class org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapterpublic boolean writeTo(ByteBuffer buf)
writeTo in class org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapterpublic boolean readFrom(ByteBuffer buf)
readFrom in class org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapterpublic byte directType()
directType in class org.gridgain.grid.util.direct.GridTcpCommunicationMessageAdapterCopyright © 2014. All rights reserved.