public class IgfsIpcEndpointConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
static String |
DFLT_HOST
Default host.
|
static int |
DFLT_MEM_SIZE
Default shared memory space in bytes.
|
static int |
DFLT_PORT
Default port.
|
static int |
DFLT_THREAD_CNT
Default threads count.
|
static String |
DFLT_TOKEN_DIR_PATH
Default token directory.
|
static IgfsIpcEndpointType |
DFLT_TYPE
Default endpoint type is TCP.
|
Constructor and Description |
---|
IgfsIpcEndpointConfiguration()
Default constructor.
|
IgfsIpcEndpointConfiguration(IgfsIpcEndpointConfiguration cfg)
Copying constructor.
|
Modifier and Type | Method and Description |
---|---|
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.
|
int |
getThreadCount()
Get number of threads used by this endpoint to process incoming requests.
|
String |
getTokenDirectoryPath()
Gets directory where shared memory tokens are stored.
|
IgfsIpcEndpointType |
getType()
Gets endpoint type.
|
IgfsIpcEndpointConfiguration |
setHost(String host)
Sets the host endpoint is bound to.
|
IgfsIpcEndpointConfiguration |
setMemorySize(int memSize)
Sets shared memory size in bytes allocated for endpoint communication.
|
IgfsIpcEndpointConfiguration |
setPort(int port)
Sets the port endpoint is bound to.
|
IgfsIpcEndpointConfiguration |
setThreadCount(int threadCnt)
Set number of threads used by this endpoint to process incoming requests.
|
IgfsIpcEndpointConfiguration |
setTokenDirectoryPath(String tokenDirPath)
Sets directory where shared memory tokens are stored.
|
IgfsIpcEndpointConfiguration |
setType(IgfsIpcEndpointType type)
Sets endpoint type.
|
String |
toString() |
public static IgfsIpcEndpointType DFLT_TYPE
public static String DFLT_HOST
public static int DFLT_PORT
public static final int DFLT_MEM_SIZE
public static final String DFLT_TOKEN_DIR_PATH
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.public static final int DFLT_THREAD_CNT
public IgfsIpcEndpointConfiguration()
public IgfsIpcEndpointConfiguration(IgfsIpcEndpointConfiguration cfg)
cfg
- Configuration to copy.public IgfsIpcEndpointType getType()
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
.
public IgfsIpcEndpointConfiguration setType(IgfsIpcEndpointType type)
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
.
type
- Endpoint type.this
for chaining.public String getHost()
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
.
public IgfsIpcEndpointConfiguration setHost(String host)
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
.
host
- Host.this
for chaining.public int getPort()
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
.
public IgfsIpcEndpointConfiguration setPort(int port)
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
.
port
- Port.this
for chaining.public int getMemorySize()
Ignored for IgfsIpcEndpointType.TCP
endpoint.
Defaults to DFLT_MEM_SIZE
.
public IgfsIpcEndpointConfiguration setMemorySize(int memSize)
Ignored for IgfsIpcEndpointType.TCP
endpoint.
Defaults to DFLT_MEM_SIZE
.
memSize
- Shared memory size.this
for chaining.public String getTokenDirectoryPath()
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
.
public IgfsIpcEndpointConfiguration setTokenDirectoryPath(String tokenDirPath)
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
.
tokenDirPath
- Directory where shared memory tokens are stored.this
for chaining.public int getThreadCount()
Defaults to DFLT_THREAD_CNT
.
public IgfsIpcEndpointConfiguration setThreadCount(int threadCnt)
See getThreadCount()
for more information.
threadCnt
- Number of threads used by this endpoint to process incoming requests.this
for chaining.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019