Class FailoverClient
java.lang.Object
edu.internet2.middleware.grouperClient.failover.FailoverClient
- All Implemented Interfaces:
Serializable
logic for hitting multiple resources checking for errors and timeouts for always availability.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
failoverLogic
(String connectionType, boolean useThreads, FailoverLogic<T> failoverLogic) run failover logic, return the result from the logicstatic <T> T
failoverLogic
(String connectionType, FailoverLogic<T> failoverLogic) run failover logic, return the result from the logiccache the config as a fieldstatic void
initFailoverClient
(FailoverConfig failoverConfig) get a failover client from memory or disk or make a new onestatic void
test serialize and unserializevoid
setFailoverConfig
(FailoverConfig failoverConfig1) cache the config as a field
-
Method Details
-
getFailoverConfig
cache the config as a field- Returns:
- config
-
setFailoverConfig
cache the config as a field- Parameters:
failoverConfig1
-
-
main
test serialize and unserialize- Parameters:
args
-
-
initFailoverClient
get a failover client from memory or disk or make a new one- Parameters:
failoverConfig
- config with the type we are talking about
-
failoverLogic
run failover logic, return the result from the logic- Type Parameters:
T
-- Parameters:
connectionType
- is the type of connectionfailoverLogic
-- Returns:
- the result from the logic
-
failoverLogic
public static <T> T failoverLogic(String connectionType, boolean useThreads, FailoverLogic<T> failoverLogic) run failover logic, return the result from the logic- Type Parameters:
T
-- Parameters:
connectionType
- is the type of connectionuseThreads
- is true if we should use threads, maybe pass false e.g. if the system is not initted and it relies on something to get configuration. generally true thoughfailoverLogic
-- Returns:
- the result from the logic
-