org.apache.ignite.internal.processors.igfs

## Interface IgfsEx

All Superinterfaces:
  IgniteAsyncSupport, IgniteFileSystem

All Known Implementing Classes:
  IgfsAsyncImpl, IgfsImpl

    public interface IgfsEx
    extends IgniteFileSystem

Internal API extension for `IgniteFileSystem`.

### Field Summary

Fields
`static String` `PROP_GROUP_NAME` File property: group name.
`static String` `PROP_PERMISSION` File property: permission.
`static String` `PROP_PREFER_LOCAL_WRITES` File property: prefer writes to local node.
`static String` `PROP_USER_NAME` File property: user name.
`static String` `SECONDARY_FS_CONFIG_PATH` Property name for path to Hadoop configuration.
`static String` `SECONDARY_FS_URI` Property name for URI of file system.
`static String` `SECONDARY_FS_USER_NAME` Property name for user name of file system.

### Fields inherited from interface org.apache.ignite.IgniteFileSystem

`IGFS_SCHEME`

### Method Summary

Methods
`IgfsSecondaryFileSystem` `asSecondary()` Return the given IGFS as a secondary file system.
`IgniteInternalFuture<?>` `awaitDeletesAsync()` Asynchronously await for all entries existing in trash to be removed.
`String` `clientLogDirectory()` Gets client file system log directory.
`void` `clientLogDirectory(String logDir)` Sets client file system log directory.
`IgfsContext` `context()`
`boolean` `evictExclude(IgfsPath path, boolean primary)` Whether this path is excluded from evictions.
`Boolean` `globalSampling()` Get sampling state.
`void` `globalSampling(Boolean val)` Enables, disables or clears sampling flag.
`IgfsStatus` `globalSpace()` Gets global space counters.
`long` `groupBlockSize()` Gets group block size, i.e. block size multiplied by group size in affinity mapper.
`boolean` `isProxy(URI path)` Check whether the given path is proxy path.
`IgfsLocalMetrics` `localMetrics()` Get local metrics.
`IgniteUuid` `nextAffinityKey()` Get next affinity key.
`IgfsInputStreamAdapter` `open(IgfsPath path)` Opens a file for reading.
`IgfsInputStreamAdapter` `open(IgfsPath path, int bufSize)` Opens a file for reading.
`IgfsInputStreamAdapter` `open(IgfsPath path, int bufSize, int seqReadsBeforePrefetch)` Opens a file for reading.
`IgfsPaths` `proxyPaths()` Get handshake message.
`void` `stop()` Stops IGFS cleaning all used resources.

### Methods inherited from interface org.apache.ignite.IgniteFileSystem

`affinity, affinity, append, append, configuration, create, create, create, delete, execute, execute, execute, execute, exists, format, info, listFiles, listPaths, metrics, mkdirs, mkdirs, name, rename, resetMetrics, setTimes, size, summary, update, usedSpaceSize, withAsync`

### Methods inherited from interface org.apache.ignite.lang.IgniteAsyncSupport

`future, isAsync`

### Field Detail

#### PROP_USER_NAME

    static final String PROP_USER_NAME

File property: user name.

See Also:
  Constant Field Values

#### PROP_GROUP_NAME

    static final String PROP_GROUP_NAME

File property: group name.

See Also:
  Constant Field Values

#### PROP_PERMISSION

    static final String PROP_PERMISSION

File property: permission.

See Also:
  Constant Field Values

#### PROP_PREFER_LOCAL_WRITES

    static final String PROP_PREFER_LOCAL_WRITES

File property: prefer writes to local node.

See Also:
  Constant Field Values

#### SECONDARY_FS_CONFIG_PATH

    static final String SECONDARY_FS_CONFIG_PATH

Property name for path to Hadoop configuration.

See Also:
  Constant Field Values

#### SECONDARY_FS_URI

    static final String SECONDARY_FS_URI

Property name for URI of file system.

See Also:
  Constant Field Values

#### SECONDARY_FS_USER_NAME

    static final String SECONDARY_FS_USER_NAME

Property name for user name of file system.

See Also:
  Constant Field Values

### Method Detail

#### stop

    void stop()

Stops IGFS cleaning all used resources.

#### context

    IgfsContext context()

Returns:
  IGFS context.

#### proxyPaths

    IgfsPaths proxyPaths()

Get handshake message.

Returns:
  Handshake message.

#### open

    IgfsInputStreamAdapter open(IgfsPath path,
                              int bufSize,
                              int seqReadsBeforePrefetch)
                                throws IgniteException

Opens a file for reading.

Specified by:
  `open` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to read.
  `bufSize` - Read buffer size (bytes) or `zero` to use default value.
  `seqReadsBeforePrefetch` - Amount of sequential reads before prefetch is started.
Returns:
  File input stream to read data from.
Throws:
  `IgniteException` - In case of error.
  `IgfsPathNotFoundException` - If path doesn't exist.

#### open

    IgfsInputStreamAdapter open(IgfsPath path)
                                throws IgniteException

Opens a file for reading.

Specified by:
  `open` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to read.
Returns:
  File input stream to read data from.
Throws:
  `IgniteException` - In case of error.
  `IgfsPathNotFoundException` - If path doesn't exist.

#### open

    IgfsInputStreamAdapter open(IgfsPath path,
                              int bufSize)
                                throws IgniteException

Opens a file for reading.

Specified by:
  `open` in interface `IgniteFileSystem`
Parameters:
  `path` - File path to read.
  `bufSize` - Read buffer size (bytes) or `zero` to use default value.
Returns:
  File input stream to read data from.
Throws:
  `IgniteException` - In case of error.
  `IgfsPathNotFoundException` - If path doesn't exist.

#### globalSpace

    IgfsStatus globalSpace()
                           throws IgniteCheckedException

Gets global space counters.

Returns:
  Tuple in which first component is used space on all nodes, second is available space on all nodes.
Throws:
  `IgniteCheckedException` - If task execution failed.

#### globalSampling

    void globalSampling(@Nullable
                      Boolean val)
                        throws IgniteCheckedException

Enables, disables or clears sampling flag.

Parameters:
  `val` - `True` to turn on sampling, `false` to turn it off, `null` to clear sampling state.
Throws:
  `IgniteCheckedException` - If failed.

#### globalSampling

    @Nullable
    Boolean globalSampling()

Get sampling state.

Returns:
  `True` in case sampling is enabled, `false` otherwise, or `null` in case sampling flag is not set.

#### localMetrics

    IgfsLocalMetrics localMetrics()

Get local metrics.

Returns:
  Local metrics.

#### groupBlockSize

    long groupBlockSize()

Gets group block size, i.e. block size multiplied by group size in affinity mapper.

Returns:
  Group block size.

#### awaitDeletesAsync

    IgniteInternalFuture<?> awaitDeletesAsync()
                                              throws IgniteCheckedException

Asynchronously await for all entries existing in trash to be removed.

Returns:
  Future which will be completed when all entries existed in trash by the time of invocation are removed.
Throws:
  `IgniteCheckedException` - If failed.

#### clientLogDirectory

    @Nullable
    String clientLogDirectory()

Gets client file system log directory.

Returns:
  Client file system log directory or `null` in case no client connections have been created yet.

#### clientLogDirectory

    void clientLogDirectory(String logDir)

Sets client file system log directory.

Parameters:
  `logDir` - Client file system log directory.

#### evictExclude

    boolean evictExclude(IgfsPath path,
                       boolean primary)

Whether this path is excluded from evictions.

Parameters:
  `path` - Path.
  `primary` - Whether the mode is PRIMARY.
Returns:
  `True` if path is excluded from evictions.

#### nextAffinityKey

    IgniteUuid nextAffinityKey()

Get next affinity key.

Returns:
  Next affinity key.

#### isProxy

    boolean isProxy(URI path)

Check whether the given path is proxy path.

Parameters:
  `path` - Path.
Returns:
  `True` if proxy.

#### asSecondary

    IgfsSecondaryFileSystem asSecondary()

Return the given IGFS as a secondary file system.

Returns:
  Secondary file system wrapper.

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0
Release Date | : March 31 2015