|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.discovery.impl.Config
@Service(value=Config.class) public class Config
Configuration object used as a central config point for the discovery service implementation
The properties are described below under.
Field Summary | |
---|---|
static String |
CONNECTION_TIMEOUT_KEY
|
static int |
DEFAULT_CONNECTION_TIMEOUT
Configure the socket connect timeout for topology connectors. |
static long |
DEFAULT_HEARTBEAT_INTERVAL
Configure the interval (in seconds) according to which the heartbeats are exchanged in the topology. |
static long |
DEFAULT_HEARTBEAT_TIMEOUT
Configure the timeout (in seconds) after which an instance is considered dead/crashed. |
static int |
DEFAULT_MIN_EVENT_DELAY
Configure the time (in seconds) which must be passed at minimum between sending TOPOLOGY_CHANGING/_CHANGED (avoid flooding). |
static int |
DEFAULT_SO_TIMEOUT
Configure the socket read timeout (SO_TIMEOUT) for topology connectors. |
static String |
DISCOVERY_RESOURCE_PATH_KEY
|
static String |
HEARTBEAT_INTERVAL_KEY
|
static String |
HEARTBEAT_TIMEOUT_KEY
|
static String |
LEADER_ELECTION_REPOSITORY_DESCRIPTOR_NAME_KEY
Name of the repository descriptor to be taken into account for leader election: those instances have preference to become leader which have the corresponding descriptor value of 'false' |
static String |
MIN_EVENT_DELAY_KEY
|
static String |
SO_TIMEOUT_KEY
|
static String |
TOPOLOGY_CONNECTOR_URLS_KEY
URLs where to join a topology, eg http://localhost:4502/libs/sling/topology/connector |
static String |
TOPOLOGY_CONNECTOR_WHITELIST_KEY
|
Constructor Summary | |
---|---|
Config()
|
Method Summary | |
---|---|
protected void |
activate(Map<String,Object> properties)
|
protected void |
configure(Map<String,Object> properties)
|
int |
getBackoffStableFactor()
Returns the (maximum) backoff factor to be used for stable connectors |
int |
getBackoffStandbyFactor()
Returns the backoff factor to be used for standby (loop) connectors |
long |
getBackoffStandbyInterval()
Returns the backoff interval for standby (loop) connectors in seconds |
String |
getClusterInstancesPath()
Returns the resource path where cluster instance informations are stored. |
int |
getConnectionTimeout()
Returns the socket connect() timeout used by the topology connector, 0 disables the timeout |
String |
getEstablishedViewPath()
Returns the resource path where the established view is stored. |
long |
getHeartbeatInterval()
Returns the interval (in seconds) in which heartbeats are sent |
long |
getHeartbeatTimeout()
Returns the timeout (in seconds) after which an instance or voting is considered invalid/timed out |
long |
getHeartbeatTimeoutMillis()
Returns the timeout (in milliseconds) after which an instance or voting is considered invalid/timed out |
long |
getKeyInterval()
|
String |
getLeaderElectionRepositoryDescriptor()
Returns the repository descriptor key which is to be included in the cluster leader election - or null. |
int |
getMinEventDelay()
Returns the minimum time (in seconds) between sending TOPOLOGY_CHANGING/_CHANGED events - to avoid flooding |
String |
getOngoingVotingsPath()
Returns the resource path where ongoing votings are stored. |
String |
getPreviousViewPath()
Returns the resource path where the previous view is stored. |
String |
getSharedKey()
|
int |
getSoTimeout()
Returns the socket read timeout (SO_TIMEOUT) used by the topology connector, 0 disables the timeout |
URL[] |
getTopologyConnectorURLs()
Returns the URLs to which to open a topology connector - or null/empty if no topology connector is configured (default is null) |
String[] |
getTopologyConnectorWhitelist()
Returns a comma separated list of hostnames and/or ip addresses which are allowed as remote hosts to open connections to the topology connector servlet |
boolean |
isAutoStopLocalLoopEnabled()
|
boolean |
isEncryptionEnabled()
|
boolean |
isGzipConnectorRequestsEnabled()
|
boolean |
isHmacEnabled()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long DEFAULT_HEARTBEAT_TIMEOUT
@Property(longValue=120L) public static final String HEARTBEAT_TIMEOUT_KEY
public static final long DEFAULT_HEARTBEAT_INTERVAL
@Property(longValue=30L) public static final String HEARTBEAT_INTERVAL_KEY
public static final int DEFAULT_MIN_EVENT_DELAY
@Property(intValue=3) public static final String MIN_EVENT_DELAY_KEY
public static final int DEFAULT_CONNECTION_TIMEOUT
@Property(intValue=10) public static final String CONNECTION_TIMEOUT_KEY
public static final int DEFAULT_SO_TIMEOUT
@Property(intValue=10) public static final String SO_TIMEOUT_KEY
@Property public static final String LEADER_ELECTION_REPOSITORY_DESCRIPTOR_NAME_KEY
@Property(cardinality=1024) public static final String TOPOLOGY_CONNECTOR_URLS_KEY
@Property(value={"localhost","127.0.0.1"}) public static final String TOPOLOGY_CONNECTOR_WHITELIST_KEY
@Property(value="/var/discovery/impl/", propertyPrivate=true) public static final String DISCOVERY_RESOURCE_PATH_KEY
Constructor Detail |
---|
public Config()
Method Detail |
---|
@Activate protected void activate(Map<String,Object> properties)
protected void configure(Map<String,Object> properties)
public long getHeartbeatTimeout()
public long getHeartbeatTimeoutMillis()
public int getConnectionTimeout()
public int getSoTimeout()
public long getHeartbeatInterval()
public int getMinEventDelay()
public URL[] getTopologyConnectorURLs()
public String[] getTopologyConnectorWhitelist()
public String getClusterInstancesPath()
public String getEstablishedViewPath()
public String getOngoingVotingsPath()
public String getPreviousViewPath()
public String getLeaderElectionRepositoryDescriptor()
When set, the value (treated as a boolean) of the repository descriptor is prepended to the leader election id.
public boolean isHmacEnabled()
public String getSharedKey()
public long getKeyInterval()
public boolean isEncryptionEnabled()
public boolean isGzipConnectorRequestsEnabled()
public boolean isAutoStopLocalLoopEnabled()
public int getBackoffStandbyFactor()
public int getBackoffStableFactor()
public long getBackoffStandbyInterval()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |