@Service(value={Config.class,org.apache.sling.discovery.base.connectors.BaseConfig.class,org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteConfig.class}) public class Config extends Object implements org.apache.sling.discovery.base.connectors.BaseConfig, org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteConfig
The properties are described below under.
Modifier and Type | Field and Description |
---|---|
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 |
protected long |
heartbeatInterval |
protected long |
heartbeatTimeout |
static String |
INVERT_REPOSITORY_DESCRIPTOR_NAME_KEY
Whether or not (default false) the leaderElectionRepositoryDescriptor should be inverted (if that one
is configured at all).
|
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 |
protected int |
minEventDelay |
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 and Description |
---|
Config() |
Modifier and Type | Method and Description |
---|---|
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.
|
long |
getClusterSyncServiceIntervalMillis() |
long |
getClusterSyncServiceTimeoutMillis() |
long |
getConnectorPingInterval() |
long |
getConnectorPingTimeout() |
String |
getDiscoveryResourcePath() |
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
|
String |
getIdMapPath() |
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 |
getSocketConnectTimeout()
Returns the socket connect() timeout used by the topology connector, 0 disables the timeout
|
int |
getSoTimeout()
Returns the socket read timeout (SO_TIMEOUT) used by the topology connector, 0 disables the timeout
|
String |
getSyncTokenPath() |
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() |
boolean |
shouldInvertRepositoryDescriptor()
Returns true when the value of the repository descriptor identified
via the property 'leaderElectionRepositoryDescriptor' should be
inverted - only applies when 'leaderElectionRepositoryDescriptor'
is configured of course.
|
boolean |
useSyncTokenService() |
public static final long DEFAULT_HEARTBEAT_TIMEOUT
@Property(longValue=120L) public static final String HEARTBEAT_TIMEOUT_KEY
protected long heartbeatTimeout
public static final long DEFAULT_HEARTBEAT_INTERVAL
@Property(longValue=30L) public static final String HEARTBEAT_INTERVAL_KEY
protected long heartbeatInterval
public static final int DEFAULT_MIN_EVENT_DELAY
@Property(intValue=3) public static final String MIN_EVENT_DELAY_KEY
protected int minEventDelay
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(boolValue=false) public static final String INVERT_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
public long getHeartbeatTimeout()
public long getHeartbeatTimeoutMillis()
public int getSocketConnectTimeout()
getSocketConnectTimeout
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public int getSoTimeout()
getSoTimeout
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public long getHeartbeatInterval()
public int getMinEventDelay()
getMinEventDelay
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public URL[] getTopologyConnectorURLs()
getTopologyConnectorURLs
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public String[] getTopologyConnectorWhitelist()
getTopologyConnectorWhitelist
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public String getDiscoveryResourcePath()
public String getClusterInstancesPath()
getClusterInstancesPath
in interface org.apache.sling.discovery.base.connectors.BaseConfig
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 shouldInvertRepositoryDescriptor()
public boolean isHmacEnabled()
isHmacEnabled
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public String getSharedKey()
getSharedKey
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public long getKeyInterval()
getKeyInterval
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public boolean isEncryptionEnabled()
isEncryptionEnabled
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public boolean isGzipConnectorRequestsEnabled()
isGzipConnectorRequestsEnabled
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public boolean isAutoStopLocalLoopEnabled()
isAutoStopLocalLoopEnabled
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public int getBackoffStandbyFactor()
getBackoffStandbyFactor
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public int getBackoffStableFactor()
getBackoffStableFactor
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public long getBackoffStandbyInterval()
getBackoffStandbyInterval
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public long getConnectorPingInterval()
getConnectorPingInterval
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public long getConnectorPingTimeout()
getConnectorPingTimeout
in interface org.apache.sling.discovery.base.connectors.BaseConfig
public String getSyncTokenPath()
getSyncTokenPath
in interface org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteConfig
public String getIdMapPath()
getIdMapPath
in interface org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteConfig
public long getClusterSyncServiceTimeoutMillis()
getClusterSyncServiceTimeoutMillis
in interface org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteConfig
public long getClusterSyncServiceIntervalMillis()
getClusterSyncServiceIntervalMillis
in interface org.apache.sling.discovery.commons.providers.spi.base.DiscoveryLiteConfig
public boolean useSyncTokenService()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.