public final class IgfsFileInfo extends Object implements Externalizable
| Modifier and Type | Class and Description |
|---|---|
static class |
IgfsFileInfo.Builder
Builder for
IgfsFileInfo. |
| Modifier and Type | Field and Description |
|---|---|
static IgniteUuid |
ROOT_ID
ID for the root directory.
|
static IgniteUuid |
TRASH_ID
ID of the trash directory.
|
| Constructor and Description |
|---|
IgfsFileInfo()
Externalizable support. |
IgfsFileInfo(boolean isDir,
Map<String,String> props)
Constructs directory or file info with
default block size. |
IgfsFileInfo(IgfsFileInfo info)
A copy constructor, which takes all data from the specified
object field-by-field.
|
IgfsFileInfo(int blockSize,
long len,
IgniteUuid affKey,
IgniteUuid lockId,
boolean evictExclude,
Map<String,String> props)
Constructs file info.
|
| Modifier and Type | Method and Description |
|---|---|
long |
accessTime() |
IgniteUuid |
affinityKey() |
void |
affinityKey(IgniteUuid affKey) |
long |
blocksCount() |
int |
blockSize()
Get single data block size to store this file.
|
static IgfsFileInfo.Builder |
builder()
Creates a builder for the new instance of file info.
|
static IgfsFileInfo.Builder |
builder(IgfsFileInfo origin)
Creates a builder for the new instance of file info,
based on the specified origin.
|
boolean |
equals(Object obj) |
boolean |
evictExclude()
Get evict exclude flag.
|
IgfsFileMap |
fileMap() |
void |
fileMap(IgfsFileMap fileMap) |
int |
hashCode() |
IgniteUuid |
id()
Gets this item ID.
|
boolean |
isDirectory() |
boolean |
isFile() |
long |
length()
Get file size.
|
Map<String,IgfsListingEntry> |
listing() |
IgniteUuid |
lockId()
Get lock ID.
|
long |
modificationTime() |
IgfsPath |
path() |
Map<String,String> |
properties()
Get properties of the file.
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final IgniteUuid ROOT_ID
public static final IgniteUuid TRASH_ID
public IgfsFileInfo()
Externalizable support.public IgfsFileInfo(boolean isDir,
@Nullable
Map<String,String> props)
default block size.isDir - Constructs directory info if true or file info if false.props - Meta properties to set.public IgfsFileInfo(int blockSize,
long len,
@Nullable
IgniteUuid affKey,
@Nullable
IgniteUuid lockId,
boolean evictExclude,
@Nullable
Map<String,String> props)
blockSize - Block size.len - Length.affKey - Affinity key.lockId - Lock ID.props - Properties.evictExclude - Evict exclude flag.public IgfsFileInfo(IgfsFileInfo info)
info - An object to copy data info.public static IgfsFileInfo.Builder builder()
public static IgfsFileInfo.Builder builder(IgfsFileInfo origin)
origin - An origin for new instance, from which
the data will be copied.public IgniteUuid id()
public boolean isFile()
True if this is a file.public boolean isDirectory()
True if this is a directory.public long length()
public int blockSize()
public long blocksCount()
public long accessTime()
public long modificationTime()
public Map<String,IgfsListingEntry> listing()
@Nullable public IgniteUuid affinityKey()
null, usual
mapper procedure is used for block affinity detection.public void affinityKey(IgniteUuid affKey)
affKey - Affinity key used for single-node file collocation.public IgfsFileMap fileMap()
public void fileMap(IgfsFileMap fileMap)
fileMap - File affinity map.public Map<String,String> properties()
@Nullable public IgniteUuid lockId()
null if file is free of locks.public boolean evictExclude()
public IgfsPath path()
public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundException
Follow @ApacheIgnite
Ignite Fabric : ver. 1.4.0 Release Date : September 24 2015