public class IgfsFileAffinityRange extends Object implements Message, 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.
|
| 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.
|
byte |
directType()
Gets message type.
|
boolean |
done() |
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 |
markDone()
Marks this range as done.
|
void |
readExternal(ObjectInput in) |
boolean |
readFrom(ByteBuffer buf,
MessageReader reader)
Reads this message from provided byte buffer.
|
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 |
writeExternal(ObjectOutput out) |
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 void markDone()
public boolean done()
public boolean regionEqual(IgfsFileAffinityRange 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 boolean writeTo(ByteBuffer buf, MessageWriter writer)
public boolean readFrom(ByteBuffer buf, MessageReader reader)
public byte directType()
directType in interface Messagepublic byte fieldsCount()
fieldsCount in interface Message
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0 Release Date : March 31 2015