public class IgfsFileAffinityRange extends Object implements Message, Externalizable, Binarylizable
| 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.
|
DIRECT_TYPE_SIZE| Constructor and Description |
|---|
IgfsFileAffinityRange()
Empty constructor required by
Externalizable. |
| Modifier and Type | Method and Description |
|---|---|
IgniteUuid |
affinityKey() |
boolean |
belongs(long blockStartOff) |
IgfsFileAffinityRange |
concat(IgfsFileAffinityRange range)
Tries to concatenate this range with a given one.
|
short |
directType()
Gets message type.
|
boolean |
empty() |
long |
endOffset() |
void |
expand(long blockStartOff,
int expansionSize)
Expands this range by given block.
|
byte |
fieldsCount()
Gets fields count.
|
boolean |
greater(long blockStartOff) |
boolean |
less(long blockStartOff) |
void |
onAckReceived()
Method called when ack message received.
|
void |
readBinary(BinaryReader reader)
Reads fields from provided reader.
|
void |
readExternal(ObjectInput in) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
void |
readRawBinary(BinaryRawReader reader)
Reads fields from provided reader.
|
boolean |
regionEqual(IgfsFileAffinityRange other)
Checks if range regions are equal.
|
Collection<IgfsFileAffinityRange> |
split(long maxSize)
Splits range into collection if smaller ranges with length equal to
maxSize. |
long |
startOffset() |
int |
status() |
String |
toString() |
void |
writeBinary(BinaryWriter writer)
Writes fields to provided writer.
|
void |
writeExternal(ObjectOutput out) |
void |
writeRawBinary(BinaryRawWriter writer)
Writes fields to provided writer.
|
boolean |
writeTo(ByteBuffer buf,
MessageWriter writer)
Writes this message to provided byte buffer.
|
public static final int RANGE_STATUS_INITIAL
public static final int RANGE_STATUS_MOVING
public static final int RANGE_STATUS_MOVED
public IgfsFileAffinityRange()
Externalizable.public IgniteUuid 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<IgfsFileAffinityRange> split(long maxSize)
maxSize.maxSize - Split part maximum size.@Nullable public IgfsFileAffinityRange concat(IgfsFileAffinityRange range)
null.range - Range to concatenate with.null if ranges are not adjacent.public boolean regionEqual(IgfsFileAffinityRange other)
other - Other range to check against.True if range regions are equal.public void onAckReceived()
onAckReceived in interface Messagepublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionpublic void writeBinary(BinaryWriter writer) throws BinaryObjectException
writeBinary in interface Binarylizablewriter - Binary object writer.BinaryObjectException - In case of error.public void readBinary(BinaryReader reader) throws BinaryObjectException
readBinary in interface Binarylizablereader - Binary object reader.BinaryObjectException - In case of error.public void writeRawBinary(BinaryRawWriter writer) throws BinaryObjectException
writer - Writer.BinaryObjectException - If fails.public void readRawBinary(BinaryRawReader reader) throws BinaryObjectException
reader - Reader.BinaryObjectException - If fails.public boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
public short directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface Message
Follow @ApacheIgnite
Ignite Fabric : ver. 2.2.0 Release Date : September 15 2017