Package com.highdeal.cnd.message
Class StatefulServiceClientTuning
java.lang.Object
com.highdeal.cnd.message.ServiceClientTuning
com.highdeal.cnd.message.StatefulServiceClientTuning
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstant describing the default value of the timeout of the rater down notification (is 10000 ms).Fields inherited from class com.highdeal.cnd.message.ServiceClientTuning
CONNECT_TIMEOUT, HEARTBEAT_DEFAULT_ACTIVATION_PERIOD_COUNT, HEARTBEAT_DEFAULT_DEAD_CONNECTION_PERIOD_COUNT, HEARTBEAT_DEFAULT_POLLING_PERIOD, SEARCH_INSTANCE_MAP_DEFAULT_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionInitializes a StatefulServiceClientTuning with the default valuesStatefulServiceClientTuning(int searchInstanceMapDurationInSecond, int heartBeatPollingPeriodInMilliSecond, int heartBeatActivationPeriodCount, int heartBeatDeadConnectionPeriodCount, int raterDownNotificationTimeoutInMilliSecond, int connectTimeoutInMilliSecond) Initializes a StatefulServiceClient with the specified value -
Method Summary
Modifier and TypeMethodDescriptionintReturns the timeout in millisecond of the rater down request.voidsetRaterDownNotificationTimeout(int timeout) Sets the timeout in millisecond of the rater down request.Methods inherited from class com.highdeal.cnd.message.ServiceClientTuning
getConnectTimeout, getHeartBeatActivationPeriodCount, getHeartBeatDeadConnectionPeriodCount, getHeartBeatPollingPeriod, getSearchInstanceMapTimeout, isDebugModeEnable, setConnectTimeout, setHeartBeatActivationPeriodCount, setHeartBeatDeadConnectionPeriodCount, setHeartBeatPollingPeriod, setSearchInstanceMapTimeout
-
Field Details
-
RATER_DOWN_NOTIFICATION_DEFAULT_TIMEOUT
public static final int RATER_DOWN_NOTIFICATION_DEFAULT_TIMEOUTConstant describing the default value of the timeout of the rater down notification (is 10000 ms).- See Also:
-
-
Constructor Details
-
StatefulServiceClientTuning
public StatefulServiceClientTuning()Initializes a StatefulServiceClientTuning with the default values -
StatefulServiceClientTuning
public StatefulServiceClientTuning(int searchInstanceMapDurationInSecond, int heartBeatPollingPeriodInMilliSecond, int heartBeatActivationPeriodCount, int heartBeatDeadConnectionPeriodCount, int raterDownNotificationTimeoutInMilliSecond, int connectTimeoutInMilliSecond) Initializes a StatefulServiceClient with the specified value- Parameters:
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 countraterDownNotificationTimeoutInMilliSecond- The timeout of the request informing the backup that a rater seems to be done- See Also:
-
-
Method Details
-
getRaterDownNotificationTimeout
public int getRaterDownNotificationTimeout()Returns the timeout in millisecond of the rater down request.- Returns:
- A duration in millisecond
-
setRaterDownNotificationTimeout
public void setRaterDownNotificationTimeout(int timeout) Sets the timeout in millisecond of the rater down request.This timeout describes the maximum duration the charging client has to expect a response from the SAP CC Core Server system when a rater instance is no more connected with the charging client. If this timeout is too small, the server may not have the time to return its response and will make the client switch to the next backup. If too long the heartbeat process will be interrupted. Prevents the client to be lock a long time if the backup are down. Its default value is
RATER_DOWN_NOTIFICATION_DEFAULT_TIMEOUT. This timeout must be set according to server parameters- Throws:
IllegalArgumentException- if timeout is out of range
-