public class IgfsFileMap extends Object implements Externalizable, Binarylizable
Constructor and Description |
---|
IgfsFileMap()
Empty constructor.
|
IgfsFileMap(IgfsFileMap old)
Constructs same file map as passed in.
|
Modifier and Type | Method and Description |
---|---|
void |
addRange(IgfsFileAffinityRange range)
Adds range to the list of already existing ranges.
|
IgniteUuid |
affinityKey(long blockOff,
boolean includeMoved)
Gets affinity key from file map based on block start offset.
|
void |
deleteRange(IgfsFileAffinityRange range)
Deletes range from map.
|
List<IgfsFileAffinityRange> |
ranges()
Gets full list of ranges present in this map.
|
void |
readBinary(BinaryReader reader)
Reads fields from provided reader.
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
updateRangeStatus(IgfsFileAffinityRange range,
int status)
Updates range status in file map.
|
void |
writeBinary(BinaryWriter writer)
Writes fields to provided writer.
|
void |
writeExternal(ObjectOutput out) |
public IgfsFileMap()
public IgfsFileMap(@Nullable IgfsFileMap old)
old
- Old map.public IgniteUuid affinityKey(long blockOff, boolean includeMoved)
blockOff
- Block start offset (divisible by block size).includeMoved
- If true
then will return affinity key for ranges marked as moved.
Otherwise will return null for such ranges.public void updateRangeStatus(IgfsFileAffinityRange range, int status)
range
- Range to update status.status
- New range status.public void deleteRange(IgfsFileAffinityRange range)
range
- Range to delete.public List<IgfsFileAffinityRange> ranges()
public void addRange(IgfsFileAffinityRange range)
range
- Range to add.public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public void writeBinary(BinaryWriter writer) throws BinaryObjectException
writeBinary
in interface Binarylizable
writer
- Binary object writer.BinaryObjectException
- In case of error.public void readBinary(BinaryReader reader) throws BinaryObjectException
readBinary
in interface Binarylizable
reader
- Binary object reader.BinaryObjectException
- In case of error.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017