org.apache.ignite.igfs

## Class IgfsIpcEndpointConfiguration

- java.lang.Object
- - org.apache.ignite.igfs.IgfsIpcEndpointConfiguration

    public class IgfsIpcEndpointConfiguration
    extends Object

IGFS IPC endpoint configuration.

### Field Summary

Fields
`static String` `DFLT_HOST` Default host.
`static int` `DFLT_MEM_SIZE` Default shared memory space in bytes.
`static int` `DFLT_PORT` Default port.
`static String` `DFLT_TOKEN_DIR_PATH` Default token directory.
`static IgfsIpcEndpointType` `DFLT_TYPE` Default endpoint type is TCP.

### Constructor Summary

Constructors
Constructor and Description
`IgfsIpcEndpointConfiguration()` Default constructor.
`IgfsIpcEndpointConfiguration(IgfsIpcEndpointConfiguration cfg)` Copying constructor.

### Method Summary

Methods
`String` `getHost()` Gets the host endpoint is bound to.
`int` `getMemorySize()` Gets shared memory size in bytes allocated for endpoint communication.
`int` `getPort()` Gets the port endpoint is bound to.
`String` `getTokenDirectoryPath()` Gets directory where shared memory tokens are stored.
`IgfsIpcEndpointType` `getType()` Gets endpoint type.
`void` `setHost(String host)` Sets the host endpoint is bound to.
`void` `setMemorySize(int memSize)` Sets shared memory size in bytes allocated for endpoint communication.
`void` `setPort(int port)` Sets the port endpoint is bound to.
`void` `setTokenDirectoryPath(String tokenDirPath)` Sets directory where shared memory tokens are stored.
`void` `setType(IgfsIpcEndpointType type)` Sets endpoint type.
`String` `toString()`

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

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

### Field Detail

#### DFLT_TYPE

    public static IgfsIpcEndpointType DFLT_TYPE

Default endpoint type is TCP.

#### DFLT_HOST

    public static String DFLT_HOST

Default host.

#### DFLT_PORT

    public static int DFLT_PORT

Default port.

#### DFLT_MEM_SIZE

    public static final int DFLT_MEM_SIZE

Default shared memory space in bytes.

See Also:
  Constant Field Values

#### DFLT_TOKEN_DIR_PATH

    public static final String DFLT_TOKEN_DIR_PATH

Default token directory. Note that this path is relative to `IGNITE_HOME/work` folder if `IGNITE_HOME` system or environment variable specified, otherwise it is relative to `work` folder under system `java.io.tmpdir` folder.

See Also:
  `IgniteConfiguration.getWorkDirectory()`, Constant Field Values

### Constructor Detail

#### IgfsIpcEndpointConfiguration

    public IgfsIpcEndpointConfiguration()

Default constructor.

#### IgfsIpcEndpointConfiguration

    public IgfsIpcEndpointConfiguration(IgfsIpcEndpointConfiguration cfg)

Copying constructor.

Parameters:
  `cfg` - Configuration to copy.

### Method Detail

#### getType

    public IgfsIpcEndpointType getType()

Gets endpoint type. There are two endpoints types: `SHMEM` working over shared memory, and `TCP` working over sockets.

Shared memory is recommended approach for Linux-based systems. For Windows TCP is the only available option.

Defaults to `DFLT_TYPE`.

Returns:
  Endpoint type.

#### setType

    public void setType(IgfsIpcEndpointType type)

Sets endpoint type. There are two endpoints types: `IgfsIpcEndpointType.SHMEM` working over shared memory, and `IgfsIpcEndpointType.TCP` working over sockets.

Shared memory is recommended approach for Linux-based systems. For Windows TCP is the only available option.

Defaults to `DFLT_TYPE`.

Parameters:
  `type` - Endpoint type.

#### getHost

    public String getHost()

Gets the host endpoint is bound to.

For `IgfsIpcEndpointType.TCP` endpoint this is the network interface server socket is bound to.

For `IgfsIpcEndpointType.SHMEM` endpoint socket connection is needed only to perform an initial handshake. All further communication is performed over shared memory. Therefore, for `SHMEM` this value is ignored and socket will be always bound to `DFLT_HOST`.

Defaults to `DFLT_HOST`.

Returns:
  Host.

#### setHost

    public void setHost(String host)

Sets the host endpoint is bound to.

For `IgfsIpcEndpointType.TCP` endpoint this is the network interface server socket is bound to.

For `IgfsIpcEndpointType.SHMEM` endpoint socket connection is needed only to perform an initial handshake. All further communication is performed over shared memory. Therefore, for `SHMEM` this value is ignored and socket will be always bound to `DFLT_HOST`.

Defaults to `DFLT_HOST`.

Parameters:
  `host` - Host.

#### getPort

    public int getPort()

Gets the port endpoint is bound to.

For `IgfsIpcEndpointType.TCP` endpoint this is the port server socket is bound to.

For `IgfsIpcEndpointType.SHMEM` endpoint socket connection is needed only to perform an initial handshake. All further communication is performed over shared memory.

Defaults to `DFLT_PORT`.

Returns:
  Port.

#### setPort

    public void setPort(int port)

Sets the port endpoint is bound to.

For `IgfsIpcEndpointType.TCP` endpoint this is the port server socket is bound to.

For `IgfsIpcEndpointType.SHMEM` endpoint socket connection is needed only to perform an initial handshake. All further communication is performed over shared memory.

Defaults to `DFLT_PORT`.

Parameters:
  `port` - Port.

#### getMemorySize

    public int getMemorySize()

Gets shared memory size in bytes allocated for endpoint communication.

Ignored for `IgfsIpcEndpointType.TCP` endpoint.

Defaults to `DFLT_MEM_SIZE`.

Returns:
  Shared memory size.

#### setMemorySize

    public void setMemorySize(int memSize)

Sets shared memory size in bytes allocated for endpoint communication.

Ignored for `IgfsIpcEndpointType.TCP` endpoint.

Defaults to `DFLT_MEM_SIZE`.

Parameters:
  `memSize` - Shared memory size.

#### getTokenDirectoryPath

    public String getTokenDirectoryPath()

Gets directory where shared memory tokens are stored.

Note that this path is relative to `IGNITE_HOME/work` folder if `IGNITE_HOME` system or environment variable specified, otherwise it is relative to `work` folder under system `java.io.tmpdir` folder.

Ignored for `IgfsIpcEndpointType.TCP` endpoint.

Defaults to `DFLT_TOKEN_DIR_PATH`.

Returns:
  Directory where shared memory tokens are stored.

#### setTokenDirectoryPath

    public void setTokenDirectoryPath(String tokenDirPath)

Sets directory where shared memory tokens are stored.

Note that this path is relative to `IGNITE_HOME/work` folder if `IGNITE_HOME` system or environment variable specified, otherwise it is relative to `work` folder under system `java.io.tmpdir` folder.

Ignored for `IgfsIpcEndpointType.TCP` endpoint.

Defaults to `DFLT_TOKEN_DIR_PATH`.

Parameters:
  `tokenDirPath` - Directory where shared memory tokens are stored.

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.3.0-incubating
Release Date | : July 10 2015