class JoinGroupTimeouts
extends java.lang.Object
There are three timeouts that are relevant at the time a Replica joins a group. They are listed below in the order in which each is applied. 1) The ENV_UNKNOWN_STATE_TIMEOUT which is basically an election timeout. If set and an election is not concluded in this time period, the environment handle is opened in the unknown state. 2) The ENV_SETUP_TIMEOUT. This timeout determines the maximum amount of time allowed to hold an election and sync up with a master if the joins as a replica. 3) The consistency timeout as determined by the consistency policy in the event that the node joins as a replica. The first two timeouts are managed by this class. RepNode.joinGroup uses the timeouts supplied by the getTimeout() method to wait for each timeout if both are specified. joinGroup first waits up to the unknown state timeout for an election to be concluded. If the node is not in the unknown state at the timeout, it advances to the env setup timeout by invoking setSetupTimeout() and proceeds to wait up to this timeout for the syncup activity to complete.
Constructor and Description |
---|
JoinGroupTimeouts(DbConfigManager configManager) |
Modifier and Type | Method and Description |
---|---|
int |
getSetupTimeout()
Returns the setup timeout
|
(package private) int |
getTimeout()
Returns the currently active timeout, adjusted for the time that has
already elapsed.
|
(package private) void |
setSetupTimeout()
Set the currently active timeout to be the env setup timeout.
|
(package private) boolean |
timeoutIsForUnknownState()
Returns true if the currently active timeout is the one for the
transition out of the unknown state.
|
JoinGroupTimeouts(DbConfigManager configManager)
int getTimeout()
public int getSetupTimeout()
boolean timeoutIsForUnknownState()
void setSetupTimeout()
Copyright (c) 2004-2012 Oracle. All rights reserved.