public class GridDrSenderHubConfiguration extends Object
| Modifier and Type | Field and Description |
|---|---|
static long |
DFLT_HEALTH_CHECK_FREQ
Default health check frequency.
|
static int |
DFLT_MAX_ERRORS
Default maximum processing errors.
|
static int |
DFLT_MAX_FAILED_CONNECT_ATTEMPTS
Default maximum failed connect attempts.
|
static int |
DFLT_MAX_QUEUE_SIZE
Default maximum amount of enqueued requests per remote receiver hub.
|
static long |
DFLT_READ_TIMEOUT
Default read timeout.
|
static long |
DFLT_RECONNECT_ON_FAILURE_TIMEOUT
Reconnect on error timeout.
|
static long |
DFLT_SYS_REQ_TIMEOUT
Default ping timeout.
|
| Constructor and Description |
|---|
GridDrSenderHubConfiguration()
Default constructor.
|
GridDrSenderHubConfiguration(GridDrSenderHubConfiguration cfg)
Copying constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String[] |
getCacheNames()
Gets cache names this sender hub works with.
|
GridDrSenderHubConnectionConfiguration[] |
getConnectionConfiguration()
Get remote data center connection configurations.
|
long |
getHealthCheckFrequency()
Gets health check frequency.
|
int |
getMaxErrors()
Gets maximum amount of sequential errors in receiver hub responses.
|
int |
getMaxFailedConnectAttempts()
Gets maximum failed connect attempts.
|
int |
getMaxQueueSize()
Gets maximum wait queue size.
|
long |
getReadTimeout()
Gets read timeout.
|
long |
getReconnectOnFailureTimeout()
Gets reconnect-on-failure timeout.
|
GridDrSenderHubStore |
getStore()
Gets store.
|
long |
getSystemRequestTimeout()
Gets system request timeout.
|
void |
setCacheNames(String... cacheNames)
Set cache names this sender hub works with.
|
void |
setConnectionConfiguration(GridDrSenderHubConnectionConfiguration... connCfg)
Set remote data center connection configurations.
|
void |
setHealthCheckFrequency(long healthCheckFreq)
Sets health check frequency.
|
void |
setMaxErrors(int maxErrors)
Sets maximum amount of sequential errors in receiver hub responses.
|
void |
setMaxFailedConnectAttempts(int maxFailedConnectAttempts)
Set maximum failed connect attempts.
|
void |
setMaxQueueSize(int maxQueueSize)
Sets maximum wait queue size.
|
void |
setReadTimeout(long readTimeout)
Sets read timeout.
|
void |
setReconnectOnFailureTimeout(long reconnectOnFailureTimeout)
Sets reconnect-on-failure timeout.
|
void |
setStore(GridDrSenderHubStore store)
Sets store.
|
void |
setSystemRequestTimeout(long sysReqTimeout)
Sets system request timeout.
|
String |
toString() |
public static final int DFLT_MAX_FAILED_CONNECT_ATTEMPTS
public static final int DFLT_MAX_ERRORS
public static final long DFLT_HEALTH_CHECK_FREQ
public static final long DFLT_SYS_REQ_TIMEOUT
public static final long DFLT_READ_TIMEOUT
public static final int DFLT_MAX_QUEUE_SIZE
public static final long DFLT_RECONNECT_ON_FAILURE_TIMEOUT
public GridDrSenderHubConfiguration()
public GridDrSenderHubConfiguration(GridDrSenderHubConfiguration cfg)
cfg - Another sender hub configuration.public GridDrSenderHubConnectionConfiguration[] getConnectionConfiguration()
public void setConnectionConfiguration(GridDrSenderHubConnectionConfiguration... connCfg)
getConnectionConfiguration() for more
information.connCfg - Remote data center connection configurations.public int getMaxFailedConnectAttempts()
getReconnectOnFailureTimeout() property.
Defaults to DFLT_MAX_FAILED_CONNECT_ATTEMPTS.
public void setMaxFailedConnectAttempts(int maxFailedConnectAttempts)
getMaxFailedConnectAttempts() for more information.maxFailedConnectAttempts - Maximum failed connect attempts.public int getMaxErrors()
getReconnectOnFailureTimeout() property.
Defaults to DFLT_MAX_ERRORS.
public void setMaxErrors(int maxErrors)
getMaxErrors() for more
information.maxErrors - Maximum amount of sequential errors in receiver hub responsespublic long getHealthCheckFrequency()
getReadTimeout() property.
Defaults to DFLT_HEALTH_CHECK_FREQ.
public void setHealthCheckFrequency(long healthCheckFreq)
getHealthCheckFrequency() for more information.healthCheckFreq - Health check frequency.public long getSystemRequestTimeout()
getReadTimeout().
In case any of these two requests was sent to receiver hub and there is no response for too long, it indicates a problem with either network connectivity or receiver hub itself. Thus, when the given timeout is exceeded, connection to receiver hub is closed.
Defaults to DFLT_SYS_REQ_TIMEOUT.
public void setSystemRequestTimeout(long sysReqTimeout)
getSystemRequestTimeout() for more information.sysReqTimeout - System request timeout.public long getReadTimeout()
Defaults to DFLT_READ_TIMEOUT.
public void setReadTimeout(long readTimeout)
getReadTimeout() for more information.readTimeout - Read timeout.public int getMaxQueueSize()
Defaults to DFLT_MAX_QUEUE_SIZE.
public void setMaxQueueSize(int maxQueueSize)
getMaxQueueSize() for more information.maxQueueSize - Maximum wait queue size.public long getReconnectOnFailureTimeout()
Defaults to DFLT_RECONNECT_ON_FAILURE_TIMEOUT.
public void setReconnectOnFailureTimeout(long reconnectOnFailureTimeout)
getReconnectOnFailureTimeout() for more information.reconnectOnFailureTimeout - Reconnect-on-failure timeout.public String[] getCacheNames()
public void setCacheNames(@Nullable String... cacheNames)
getCacheNames() for more information.cacheNames - Cache names this sender hub works with.public GridDrSenderHubStore getStore()
If set to null then GridDrSenderHubInMemoryStore will be used as a default.
public void setStore(GridDrSenderHubStore store)
getStore() for more information.store - Store.Copyright © 2014. All rights reserved.