public class GridGgfsFileMap extends Object implements Externalizable
| Constructor and Description |
|---|
GridGgfsFileMap()
Empty constructor.
|
GridGgfsFileMap(GridGgfsFileMap old)
Constructs same file map as passed in.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addRange(GridGgfsFileAffinityRange range)
Adds range to the list of already existing ranges.
|
org.gridgain.grid.GridUuid |
affinityKey(long blockOff,
boolean includeMoved)
Gets affinity key from file map based on block start offset.
|
void |
deleteRange(GridGgfsFileAffinityRange range)
Deletes range from map.
|
List<GridGgfsFileAffinityRange> |
ranges()
Gets full list of ranges present in this map.
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
updateRangeStatus(GridGgfsFileAffinityRange range,
int status)
Updates range status in file map.
|
void |
writeExternal(ObjectOutput out) |
public GridGgfsFileMap()
public GridGgfsFileMap(@Nullable
GridGgfsFileMap old)
old - Old map.public org.gridgain.grid.GridUuid 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(GridGgfsFileAffinityRange range, int status) throws org.gridgain.grid.GridException
range - Range to update status.status - New range status.org.gridgain.grid.GridException - If range was not found.public void deleteRange(GridGgfsFileAffinityRange range) throws org.gridgain.grid.GridException
range - Range to delete.org.gridgain.grid.GridExceptionpublic List<GridGgfsFileAffinityRange> ranges()
public void addRange(GridGgfsFileAffinityRange range)
range - Range to add.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2014. All rights reserved.