edu.internet2.middleware.grouperClient.failover
Class FailoverConfig

java.lang.Object
  extended by edu.internet2.middleware.grouperClient.failover.FailoverConfig

public class FailoverConfig
extends java.lang.Object

configuration of a failover connection type

Author:
mchyzer

Nested Class Summary
static class FailoverConfig.FailoverStrategy
          failover strategy to employ with each pool type
 
Constructor Summary
FailoverConfig()
           
 
Method Summary
 void copyFromArgument(FailoverConfig failoverConfig)
          copy a failover client from another
 int getAffinitySeconds()
          if we are active/active, then the same connection will be used for a certain number of seconds.
 java.util.List<java.lang.String> getConnectionNames()
          names of the connections in the pool, if it is active/standby, then these are ordered from more important to less important
 java.util.List<java.lang.String> getConnectionNamesSecondTier()
          names of the connections in the pool, note that the "connectionNames" list will be tried first if same number of errors recently
 java.lang.String getConnectionType()
          string that identifies this failover config from other failover config, e.g.
 int getExtraTimeoutSeconds()
          after all connections have been attempted, it will wait for this long to see if any finish
 FailoverConfig.FailoverStrategy getFailoverStrategy()
          actice/active or active/standby
 int getMinutesToKeepErrors()
          minutes to remember that there was an error for a connection name of a connection type
 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.
 int getTimeoutSeconds()
          when a connection is attempted, this is the timeout that it will use before trying another connection
 void setAffinitySeconds(int affinitySeconds1)
          if we are active/active, then the same connection will be used for a certain number of seconds.
 void setConnectionNames(java.util.List<java.lang.String> connectionNames1)
          names of the connections in the pool, if it is active/standby, then these are ordered from more important to less important
 void setConnectionNamesSecondTier(java.util.List<java.lang.String> connectionNamesSecondTier1)
          names of the connections in the pool, note that the "connectionNames" list will be tried first if same number of errors recently
 void setConnectionType(java.lang.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 finish
 void setFailoverStrategy(FailoverConfig.FailoverStrategy failoverStrategy1)
          actice/active or active/standby
 void setMinutesToKeepErrors(int minutesToKeepErrors1)
          minutes to remember that there was an error for a connection name of a connection type
 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.
 void setTimeoutSeconds(int timeoutSeconds1)
          when a connection is attempted, this is the timeout that it will use before trying another connection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FailoverConfig

public FailoverConfig()
Method Detail

copyFromArgument

public void copyFromArgument(FailoverConfig failoverConfig)
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

public java.lang.String getConnectionType()
string that identifies this failover config from other failover config, e.g. webServiceReadOnlyPool

Returns:
the connection type

setConnectionType

public void setConnectionType(java.lang.String connectionType1)
string that identifies this failover config from other failover config, e.g. webServiceReadOnlyPool

Parameters:
connectionType1 -

getConnectionNamesSecondTier

public java.util.List<java.lang.String> 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

public void setConnectionNamesSecondTier(java.util.List<java.lang.String> connectionNamesSecondTier1)
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

public java.util.List<java.lang.String> 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

public void setConnectionNames(java.util.List<java.lang.String> connectionNames1)
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

public FailoverConfig.FailoverStrategy getFailoverStrategy()
actice/active or active/standby

Returns:
actice/active or active/standby

setFailoverStrategy

public void setFailoverStrategy(FailoverConfig.FailoverStrategy failoverStrategy1)
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 -