public class ServiceClientTuning
extends java.lang.Object
Connect timeout
Number of period that iden Heartbeat Activation Period Count
Heartbeat Dead Connection Period Count
Heartbeat Polling Period
Search Instance Map timeout
Notice modified these properties can prevent the client to start or make the High Availability process unstable. Ensure that you understand the consequences of your modification, contact your SAP Support Team for further information.
| Modifier and Type | Field and Description |
|---|---|
static int |
CONNECT_TIMEOUT
Constant describing the default value for the connect timeout; Default is 10,000 ms.
|
static int |
HEARTBEAT_DEFAULT_ACTIVATION_PERIOD_COUNT
Constant describing the default value of the heartbeat activation period count; Default is 1.
|
static int |
HEARTBEAT_DEFAULT_DEAD_CONNECTION_PERIOD_COUNT
Constant describing the default value of the heartbeat dead connection period count; Default is 2.
|
static int |
HEARTBEAT_DEFAULT_POLLING_PERIOD
Constant describing the default polling period of the heartbeat; Default is 2,000 milliseconds.
|
static int |
SEARCH_INSTANCE_MAP_DEFAULT_TIMEOUT
Constant describing the default maximum duration of the search instance map operation; Default is 30 seconds.
|
| Constructor and Description |
|---|
ServiceClientTuning()
Initializes a ServiceClientTuning with the default options:
SEARCH_INSTANCE_MAP_DEFAULT_TIMEOUT,
HEARTBEAT_DEFAULT_POLLING_PERIOD,
HEARTBEAT_DEFAULT_ACTIVATION_PERIOD_COUNT, and
HEARTBEAT_DEFAULT_DEAD_CONNECTION_PERIOD_COUNT. |
ServiceClientTuning(int searchInstanceMapDurationInSecond,
int heartBeatPollingPeriodInMilliSecond,
int heartBeatActivationPeriodCount,
int heartBeatDeadConnectionPeriodCount)
Initializes a ServiceClientTuning with the specified options;
Refer to the related methods detailled in the See Also section.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConnectTimeout()
Returns the max duration in millisecond to wait before to declared that a connecting operation has failed.
|
int |
getHeartBeatActivationPeriodCount()
Returns the number of polling period of the heartbeat service before to declare a connection not used.
|
int |
getHeartBeatDeadConnectionPeriodCount()
Returns the number of heartbeat service polling period before to declare a server instance is down.
|
int |
getHeartBeatPollingPeriod()
Returns the polling period of the heartbeat service.
|
int |
getSearchInstanceMapTimeout()
Returns the maximum duration of the searching instance map operation.
|
boolean |
isDebugModeEnable()
Returns if the debug mode is enable or not; This mode sets all the timeout to NO_TIMEOUT.
|
void |
setConnectTimeout(int timeoutInMillisecond)
Sets the maximum duration (in millisecond) to wait before to declared that a connecting operation has failed.
|
void |
setHeartBeatActivationPeriodCount(int periodCount)
Sets the number of polling periods (of the heartbeat service) that describes the inactivity duration of a connection
after which the heartbeat will be activated on this connection.
|
void |
setHeartBeatDeadConnectionPeriodCount(int periodCount)
Sets the number of polling periods (of the heartbeat service) that describes the timeout after which an instance of the SAP CC system which has
not replied to a heartbeat ping message, will be considered as down.
|
void |
setHeartBeatPollingPeriod(int periodInMilliSecond)
Sets the polling period of the heartbeat service.
|
void |
setSearchInstanceMapTimeout(int durationInSecond)
Sets the max duration of the searching instance map operation including the connection opening with the remote instance.
|
public static final int SEARCH_INSTANCE_MAP_DEFAULT_TIMEOUT
public static final int HEARTBEAT_DEFAULT_POLLING_PERIOD
public static final int HEARTBEAT_DEFAULT_ACTIVATION_PERIOD_COUNT
public static final int HEARTBEAT_DEFAULT_DEAD_CONNECTION_PERIOD_COUNT
public static final int CONNECT_TIMEOUT
public ServiceClientTuning()
SEARCH_INSTANCE_MAP_DEFAULT_TIMEOUT,
HEARTBEAT_DEFAULT_POLLING_PERIOD,
HEARTBEAT_DEFAULT_ACTIVATION_PERIOD_COUNT, and
HEARTBEAT_DEFAULT_DEAD_CONNECTION_PERIOD_COUNT.
Refer to these constant values.
public ServiceClientTuning(int searchInstanceMapDurationInSecond,
int heartBeatPollingPeriodInMilliSecond,
int heartBeatActivationPeriodCount,
int heartBeatDeadConnectionPeriodCount)
Note
If the system property transactive.debug.mode exists, the client is initialized
in mode debug. The mode debug disables the Heartbeat service and
sets the timeouts to NO_TIMEOUT. The specified timeouts are ignored.
searchInstanceMapDurationInSecond - The timeout of the search instance mapheartBeatPollingPeriodInMilliSecond - The heart beat polling periodheartBeatActivationPeriodCount - The heat beat activation polling period countheartBeatDeadConnectionPeriodCount - The heart beat dead connection polling period countsetSearchInstanceMapTimeout(int),
setHeartBeatPollingPeriod(int),
setHeartBeatActivationPeriodCount(int),
setHeartBeatDeadConnectionPeriodCount(int)public void setSearchInstanceMapTimeout(int durationInSecond)
When the service client is connecting to the service server, it asks the boot server for
the instance map. This operation can fail because the boot server is down or does not
replied. This timeout is the max duration the client has to expect a reply from the server system. If this timeout
is expired without replied, the client stops. Its default value is
SEARCH_INSTANCE_MAP_DEFAULT_TIMEOUT.
If the server is down, the client may not wait this duration but stop immediatly. This timeout is useful
when the server is running but cannot be reached by the client (ip interface down, firewall issues, etc...).
In this case the client will take a long time before to stop. This timeout limit this duration. Of course, a
too small timeout can prevent client for starting.
durationInSecond - A duration in second or Constants.NO_TIMEOUT if
the timeout is not useful.java.lang.IllegalArgumentException - if durationInSecond is not equals
Constants.NO_TIMEOUT and is negative.public int getSearchInstanceMapTimeout()
Constants.NO_TIMEOUT if no timeout is neededsetSearchInstanceMapTimeout(int)public void setHeartBeatPollingPeriod(int periodInMilliSecond)
Useful only if the High Availability service is enabled (At least one rating instance backup is defined in
the instance map), it is the duration between two heartbeat service activations. This service detects down
or new restarted instances sending at each activation ping messages to the instances and makes the switches
to or from the backups when useful.
Smaller is this value, faster is the detection of down or restarted instances and smaller is the service
interruption, but more the network resources will be used. A too high value will make the service
interruption longer but the network resources will be less used when all goes well.
Its default value is HEARTBEAT_DEFAULT_POLLING_PERIOD.
periodInMilliSecond - The period in millisecondjava.lang.IllegalArgumentException - if periodInMilliSecond is smaller than 1public int getHeartBeatPollingPeriod()
setHeartBeatPollingPeriod(int)public void setHeartBeatActivationPeriodCount(int periodCount)
The activation period is
periodCount*. If a
connection has not been used during at least the activation period, the heartbeat will be activated and
will start to detect if the connection is down or not (executing ping operation).getHeartBeatPollingPeriod()
This parameter is useful to prevent to use of network resource when the client is in full charge.
Its default value is:
HEARTBEAT_DEFAULT_ACTIVATION_PERIOD_COUNT.
periodCount - A positive numberjava.lang.IllegalArgumentException - if periodCount is negativesetHeartBeatPollingPeriod(int)public int getHeartBeatActivationPeriodCount()
setHeartBeatActivationPeriodCount(int)public void setHeartBeatDeadConnectionPeriodCount(int periodCount)
The dead connection period is
periodCount*. If an
instance has not replied to a heart beat ping message before this timeout has expired, it is considered as
down. A too small value makes the heartbeat service detect down connection even if the instance is running.
At the opposite a too high value will make service interruption with a really down instance very long.#getHeartBeatPollingPeriod()
Its default value is:
HEARTBEAT_DEFAULT_DEAD_CONNECTION_PERIOD_COUNT.
periodCount - A positive number greather than 0java.lang.IllegalArgumentException - if periodCount is out of rangesetHeartBeatPollingPeriod(int)public int getHeartBeatDeadConnectionPeriodCount()
setHeartBeatDeadConnectionPeriodCount(int)public void setConnectTimeout(int timeoutInMillisecond)
This timeout is useful to detect the down instance faster.
Its default value is CONNECT_TIMEOUT.
timeoutInMillisecond - The timeout in millisecond positive, 0, or NO_TIMEOUTjava.lang.IllegalArgumentException - if connectTimeoutInMilliSecond is out of rangepublic int getConnectTimeout()
NO_TIMEOUTpublic boolean isDebugModeEnable()
true if the debug mode is enabled, false otherwise