org.apache.ignite.internal.processors.igfs

## Class IgfsFileInfo

- java.lang.Object
- - org.apache.ignite.internal.processors.igfs.IgfsEntryInfo
  - - org.apache.ignite.internal.processors.igfs.IgfsFileInfo

All Implemented Interfaces:
  Externalizable, Serializable, Binarylizable

    public final class IgfsFileInfo
    extends IgfsEntryInfo
    implements Binarylizable

IGFS file info.

See Also:
  Serialized Form

### Field Summary

### Fields inherited from class org.apache.ignite.internal.processors.igfs.IgfsEntryInfo

`accessTime, id, modificationTime, props`

### Constructor Summary

Constructors
Constructor and Description
`IgfsFileInfo()` `Externalizable` support.

### Method Summary

Methods
`IgniteUuid` `affinityKey()`
`long` `blocksCount()`
`int` `blockSize()` Get single data block size to store this file.
`protected IgfsFileInfo` `copy()` Copy file info.
`boolean` `equals(Object obj)`
`boolean` `evictExclude()` Get evict exclude flag.
`IgfsFileMap` `fileMap()`
`IgfsFileInfo` `fileMap(IgfsFileMap fileMap)` Update file map.
`boolean` `hasChild(String name)`
`boolean` `hasChild(String name, IgniteUuid expId)`
`boolean` `hasChildren()`
`int` `hashCode()`
`boolean` `isFile()`
`long` `length()` Get file size.
`IgfsFileInfo` `length(long len)` Update length.
`Map<String,IgfsListingEntry>` `listing()`
`IgfsEntryInfo` `listing(Map<String,IgfsListingEntry> listing)` Update listing.
`IgfsFileInfo` `lock(IgniteUuid lockId)` Lock file.
`IgniteUuid` `lockId()` Get lock ID.
`void` `readBinary(BinaryReader reader)` Reads fields from provided reader.
`void` `readExternal(ObjectInput in)`
`String` `toString()`
`IgfsFileInfo` `unlock(long modificationTime)` Unlock file.
`void` `writeBinary(BinaryWriter writer)` Writes fields to provided writer.
`void` `writeExternal(ObjectOutput out)`

### Methods inherited from class org.apache.ignite.internal.processors.igfs.IgfsEntryInfo

`accessModificationTime, accessTime, id, isDirectory, modificationTime, properties, properties, readBinary, writeBinary`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### IgfsFileInfo

    public IgfsFileInfo()

`Externalizable` support.

### Method Detail

#### length

    public IgfsFileInfo length(long len)

Update length.

Specified by:
  `length` in class `IgfsEntryInfo`
Parameters:
  `len` - New length.
Returns:
  Updated file info.

#### listing

    public IgfsEntryInfo listing(@Nullable
                        Map<String,IgfsListingEntry> listing)

Update listing.

Specified by:
  `listing` in class `IgfsEntryInfo`
Parameters:
  `listing` - Listing.
Returns:
  Updated file info.

#### lock

    public IgfsFileInfo lock(IgniteUuid lockId)

Lock file.

Specified by:
  `lock` in class `IgfsEntryInfo`
Parameters:
  `lockId` - Lock ID.
Returns:
  Update file info.

#### unlock

    public IgfsFileInfo unlock(long modificationTime)

Unlock file.

Specified by:
  `unlock` in class `IgfsEntryInfo`
Parameters:
  `modificationTime` - Modification time.
Returns:
  Updated file info.

#### fileMap

    public IgfsFileInfo fileMap(IgfsFileMap fileMap)

Update file map.

Specified by:
  `fileMap` in class `IgfsEntryInfo`
Parameters:
  `fileMap` - File affinity map.
Returns:
  Updated file info.

#### copy

    protected IgfsFileInfo copy()

Copy file info.

Specified by:
  `copy` in class `IgfsEntryInfo`
Returns:
  Copy.

#### isFile

    public boolean isFile()

Specified by:
  `isFile` in class `IgfsEntryInfo`
Returns:
  `True` if this is a file.

#### length

    public long length()

Get file size.

Specified by:
  `length` in class `IgfsEntryInfo`
Returns:
  File size.

#### blockSize

    public int blockSize()

Get single data block size to store this file.

Specified by:
  `blockSize` in class `IgfsEntryInfo`
Returns:
  Single data block size to store this file.

#### blocksCount

    public long blocksCount()

Specified by:
  `blocksCount` in class `IgfsEntryInfo`
Returns:
  Number of data blocks to store this file.

#### listing

    public Map<String,IgfsListingEntry> listing()

Specified by:
  `listing` in class `IgfsEntryInfo`
Returns:
  Directory listing.

#### hasChildren

    public boolean hasChildren()

Specified by:
  `hasChildren` in class `IgfsEntryInfo`
Returns:
  `True` if at least one child exists.

#### hasChild

    public boolean hasChild(String name)

Specified by:
  `hasChild` in class `IgfsEntryInfo`
Parameters:
  `name` - Child name.
Returns:
  `True` if child with such name exists.

#### hasChild

    public boolean hasChild(String name,
                   IgniteUuid expId)

Specified by:
  `hasChild` in class `IgfsEntryInfo`
Parameters:
  `name` - Child name.
  `expId` - Expected child ID.
Returns:
  `True` if child with such name exists.

#### affinityKey

    @Nullable
    public IgniteUuid affinityKey()

Specified by:
  `affinityKey` in class `IgfsEntryInfo`
Returns:
  Affinity key used for single-node file collocation. If `null`, usual mapper procedure is used for block affinity detection.

#### fileMap

    public IgfsFileMap fileMap()

Specified by:
  `fileMap` in class `IgfsEntryInfo`
Returns:
  File affinity map.

#### lockId

    @Nullable
    public IgniteUuid lockId()

Get lock ID.

Specified by:
  `lockId` in class `IgfsEntryInfo`
Returns:
  Lock ID if file is locked or `null` if file is free of locks.

#### evictExclude

    public boolean evictExclude()

Get evict exclude flag.

Specified by:
  `evictExclude` in class `IgfsEntryInfo`
Returns:
  Evict exclude flag.

#### writeExternal

    public void writeExternal(ObjectOutput out)
                       throws IOException

Specified by:
  `writeExternal` in interface `Externalizable`
Overrides:
  `writeExternal` in class `IgfsEntryInfo`
Throws:
  `IOException`

#### readExternal

    public void readExternal(ObjectInput in)
                      throws IOException,
                             ClassNotFoundException

Specified by:
  `readExternal` in interface `Externalizable`
Overrides:
  `readExternal` in class `IgfsEntryInfo`
Throws:
  `IOException`
  `ClassNotFoundException`

#### writeBinary

    public void writeBinary(BinaryWriter writer)
                     throws BinaryObjectException

Writes fields to provided writer.

Specified by:
  `writeBinary` in interface `Binarylizable`
Parameters:
  `writer` - Binary object writer.
Throws:
  `BinaryObjectException` - In case of error.

#### readBinary

    public void readBinary(BinaryReader reader)
                    throws BinaryObjectException

Reads fields from provided reader.

Specified by:
  `readBinary` in interface `Binarylizable`
Parameters:
  `reader` - Binary object reader.
Throws:
  `BinaryObjectException` - In case of error.

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Object`

#### equals

    public boolean equals(Object obj)

Overrides:
  `equals` in class `Object`

#### toString

    public String toString()

Overrides:
  `toString` in class `IgfsEntryInfo`

2017 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.2.0
Release Date | : September 15 2017