Class FailoverConfig
java.lang.Object
edu.internet2.middleware.grouperClient.failover.FailoverConfig
configuration of a failover connection type
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
failover strategy to employ with each pool type -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
copyFromArgument
(FailoverConfig failoverConfig) copy a failover client from anotherint
if we are active/active, then the same connection will be used for a certain number of seconds.names of the connections in the pool, if it is active/standby, then these are ordered from more important to less importantnames of the connections in the pool, note that the "connectionNames" list will be tried first if same number of errors recentlystring that identifies this failover config from other failover config, e.g.int
after all connections have been attempted, it will wait for this long to see if any finishactice/active or active/standbyint
minutes to remember that there was an error for a connection name of a connection typeint
if your app has a slow startup time, and the initial connections are timing out esp if you arent just using the command line client (e.g.int
when a connection is attempted, this is the timeout that it will use before trying another connectionvoid
setAffinitySeconds
(int affinitySeconds1) if we are active/active, then the same connection will be used for a certain number of seconds.void
setConnectionNames
(List<String> connectionNames1) names of the connections in the pool, if it is active/standby, then these are ordered from more important to less importantvoid
setConnectionNamesSecondTier
(List<String> connectionNamesSecondTier1) names of the connections in the pool, note that the "connectionNames" list will be tried first if same number of errors recentlyvoid
setConnectionType
(String connectionType1) string that identifies this failover config from other failover config, e.g.void
setExtraTimeoutSeconds
(int extraTimeoutSeconds1) after all connections have been attempted, it will wait for this long to see if any finishvoid
setFailoverStrategy
(FailoverConfig.FailoverStrategy failoverStrategy1) actice/active or active/standbyvoid
setMinutesToKeepErrors
(int minutesToKeepErrors1) minutes to remember that there was an error for a connection name of a connection typevoid
setSecondsForClassesToLoad
(int secondsForClassesToLoad1) if your app has a slow startup time, and the initial connections are timing out esp if you arent just using the command line client (e.g.void
setTimeoutSeconds
(int timeoutSeconds1) when a connection is attempted, this is the timeout that it will use before trying another connection
-
Constructor Details
-
FailoverConfig
public FailoverConfig()
-
-
Method Details
-
copyFromArgument
copy a failover client from another- Parameters:
failoverConfig
-
-
getSecondsForClassesToLoad
public int getSecondsForClassesToLoad()if your app has a slow startup time, and the initial connections are timing out esp if you arent just using the command line client (e.g. if using it as a jar), then add more time here- Returns:
- seconds for classes to load
-
setSecondsForClassesToLoad
public void setSecondsForClassesToLoad(int secondsForClassesToLoad1) if your app has a slow startup time, and the initial connections are timing out esp if you arent just using the command line client (e.g. if using it as a jar), then add more time here- Parameters:
secondsForClassesToLoad1
-
-
getConnectionType
string that identifies this failover config from other failover config, e.g. webServiceReadOnlyPool- Returns:
- the connection type
-
setConnectionType
string that identifies this failover config from other failover config, e.g. webServiceReadOnlyPool- Parameters:
connectionType1
-
-
getConnectionNamesSecondTier
names of the connections in the pool, note that the "connectionNames" list will be tried first if same number of errors recently- Returns:
- connection names second tier
-
setConnectionNamesSecondTier
names of the connections in the pool, note that the "connectionNames" list will be tried first if same number of errors recently- Parameters:
connectionNamesSecondTier1
-
-
getConnectionNames
names of the connections in the pool, if it is active/standby, then these are ordered from more important to less important- Returns:
- the list
-
setConnectionNames
names of the connections in the pool, if it is active/standby, then these are ordered from more important to less important- Parameters:
connectionNames1
-
-
getMinutesToKeepErrors
public int getMinutesToKeepErrors()minutes to remember that there was an error for a connection name of a connection type- Returns:
- minutes to keep errors
-
setMinutesToKeepErrors
public void setMinutesToKeepErrors(int minutesToKeepErrors1) minutes to remember that there was an error for a connection name of a connection type- Parameters:
minutesToKeepErrors1
-
-
getFailoverStrategy
actice/active or active/standby- Returns:
- actice/active or active/standby
-
setFailoverStrategy
actice/active or active/standby- Parameters:
failoverStrategy1
-
-
getAffinitySeconds
public int getAffinitySeconds()if we are active/active, then the same connection will be used for a certain number of seconds. If this is -1, then always keep the same server (unless errors)- Returns:
- affinity seconds
-
setAffinitySeconds
public void setAffinitySeconds(int affinitySeconds1) if we are active/active, then the same connection will be used for a certain number of seconds. If this is -1, then always keep the same server (unless errors)- Parameters:
affinitySeconds1
-
-
getTimeoutSeconds
public int getTimeoutSeconds()when a connection is attempted, this is the timeout that it will use before trying another connection- Returns:
- timeout seconds
-
setTimeoutSeconds
public void setTimeoutSeconds(int timeoutSeconds1) when a connection is attempted, this is the timeout that it will use before trying another connection- Parameters:
timeoutSeconds1
-
-
getExtraTimeoutSeconds
public int getExtraTimeoutSeconds()after all connections have been attempted, it will wait for this long to see if any finish- Returns:
- extra timeout seconds
-
setExtraTimeoutSeconds
public void setExtraTimeoutSeconds(int extraTimeoutSeconds1) after all connections have been attempted, it will wait for this long to see if any finish- Parameters:
extraTimeoutSeconds1
-
-