Package org.apache.sling.discovery.oak
Class Config
java.lang.Object
org.apache.sling.discovery.oak.Config
- All Implemented Interfaces:
BaseConfig
,DiscoveryLiteConfig
Configuration object used as a central config point for the discovery service
implementation
The properties are described below under.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
activate
(org.osgi.framework.BundleContext context, DiscoveryServiceCentralConfig config) protected void
int
Returns the (maximum) backoff factor to be used for stable connectorsint
Returns the backoff factor to be used for standby (loop) connectorslong
Returns the backoff interval for standby (loop) connectors in secondsReturns the resource path where cluster instance informations are stored.long
Returns the interval (in milliseconds) to be used when waiting for the sync tokens or id mappinglong
Returns the timeout (in milliseconds) to be used when waiting for the sync tokens or id mappinglong
Returns the interval (in seconds) in which connectors are pingedlong
Returns the timeout (in seconds) after which a connector ping is considered invalid/timed outlong
protected String
Returns the configured path to store the idMap tolong
long
long
int
Returns the minimum time (in seconds) between sending TOPOLOGY_CHANGING/_CHANGED events - to avoid floodingint
Returns the socket connect() timeout used by the topology connector, 0 disables the timeoutint
Returns the socket read timeout (SO_TIMEOUT) used by the topology connector, 0 disables the timeoutlong
boolean
boolean
Returns the configured path to store the syncTokens toURL[]
Returns the URLs to which to open a topology connector - or null/empty if no topology connector is configured (default is null)String[]
Returns a comma separated list of hostnames and/or ip addresses which are allowed as remote hosts to open connections to the topology connector servletboolean
boolean
boolean
boolean
boolean
-
Field Details
-
connectorPingTimeout
protected long connectorPingTimeout -
connectorPingInterval
protected long connectorPingInterval -
discoveryLiteCheckInterval
protected long discoveryLiteCheckInterval -
clusterSyncServiceTimeout
protected long clusterSyncServiceTimeout -
clusterSyncServiceInterval
protected long clusterSyncServiceInterval -
minEventDelay
protected int minEventDelay -
topologyConnectorWhitelist
-
discoveryResourcePath
-
leaderElectionPrefix
protected long leaderElectionPrefix -
invertLeaderElectionPrefixOrder
protected boolean invertLeaderElectionPrefixOrder -
suppressPartiallyStartedInstance
protected boolean suppressPartiallyStartedInstance -
suppressionTimeoutSeconds
protected long suppressionTimeoutSeconds -
joinerDelaySeconds
protected long joinerDelaySeconds
-
-
Constructor Details
-
Config
public Config()
-
-
Method Details
-
activate
protected void activate(org.osgi.framework.BundleContext context, DiscoveryServiceCentralConfig config) -
configure
-
getSocketConnectTimeout
public int getSocketConnectTimeout()Returns the socket connect() timeout used by the topology connector, 0 disables the timeout- Specified by:
getSocketConnectTimeout
in interfaceBaseConfig
- Returns:
- the socket connect() timeout used by the topology connector, 0 disables the timeout
-
getSoTimeout
public int getSoTimeout()Returns the socket read timeout (SO_TIMEOUT) used by the topology connector, 0 disables the timeout- Specified by:
getSoTimeout
in interfaceBaseConfig
- Returns:
- the socket read timeout (SO_TIMEOUT) used by the topology connector, 0 disables the timeout
-
getMinEventDelay
public int getMinEventDelay()Returns the minimum time (in seconds) between sending TOPOLOGY_CHANGING/_CHANGED events - to avoid flooding- Specified by:
getMinEventDelay
in interfaceBaseConfig
- Returns:
- the minimum time (in seconds) between sending TOPOLOGY_CHANGING/_CHANGED events - to avoid flooding
-
getTopologyConnectorURLs
Returns the URLs to which to open a topology connector - or null/empty if no topology connector is configured (default is null)- Specified by:
getTopologyConnectorURLs
in interfaceBaseConfig
- Returns:
- the URLs to which to open a topology connector - or null/empty if no topology connector is configured
-
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- Specified by:
getTopologyConnectorWhitelist
in interfaceBaseConfig
- 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
-
getDiscoveryResourcePath
-
getClusterInstancesPath
Returns the resource path where cluster instance informations are stored.- Specified by:
getClusterInstancesPath
in interfaceBaseConfig
- Returns:
- the resource path where cluster instance informations are stored
-
getSyncTokenPath
Description copied from interface:DiscoveryLiteConfig
Returns the configured path to store the syncTokens to- Specified by:
getSyncTokenPath
in interfaceDiscoveryLiteConfig
- Returns:
- the configured path to store the syncTokens to
-
getIdMapPath
Description copied from interface:DiscoveryLiteConfig
Returns the configured path to store the idMap to- Specified by:
getIdMapPath
in interfaceDiscoveryLiteConfig
- Returns:
- the configured path to store the idMap to
-
isHmacEnabled
public boolean isHmacEnabled()- Specified by:
isHmacEnabled
in interfaceBaseConfig
- Returns:
- true if hmac is enabled.
-
getKeyInterval
public long getKeyInterval()- Specified by:
getKeyInterval
in interfaceBaseConfig
- Returns:
- the interval of the shared key for hmac.
-
isEncryptionEnabled
public boolean isEncryptionEnabled()- Specified by:
isEncryptionEnabled
in interfaceBaseConfig
- Returns:
- true if encryption is enabled.
-
isGzipConnectorRequestsEnabled
public boolean isGzipConnectorRequestsEnabled()- Specified by:
isGzipConnectorRequestsEnabled
in interfaceBaseConfig
- Returns:
- true if requests on the topology connector should be gzipped (which only works if the server accepts that.. ie discovery.impl 1.0.4+)
-
isAutoStopLocalLoopEnabled
public boolean isAutoStopLocalLoopEnabled()- Specified by:
isAutoStopLocalLoopEnabled
in interfaceBaseConfig
- Returns:
- true if the auto-stopping of local-loop topology connectors is enabled.
-
getBackoffStandbyFactor
public int getBackoffStandbyFactor()Returns the backoff factor to be used for standby (loop) connectors- Specified by:
getBackoffStandbyFactor
in interfaceBaseConfig
- Returns:
- the backoff factor to be used for standby (loop) connectors
-
getBackoffStableFactor
public int getBackoffStableFactor()Returns the (maximum) backoff factor to be used for stable connectors- Specified by:
getBackoffStableFactor
in interfaceBaseConfig
- Returns:
- the (maximum) backoff factor to be used for stable connectors
-
getBackoffStandbyInterval
public long getBackoffStandbyInterval()Returns the backoff interval for standby (loop) connectors in seconds- Specified by:
getBackoffStandbyInterval
in interfaceBaseConfig
- Returns:
- the backoff interval for standby (loop) connectors in seconds
-
getConnectorPingInterval
public long getConnectorPingInterval()Description copied from interface:BaseConfig
Returns the interval (in seconds) in which connectors are pinged- Specified by:
getConnectorPingInterval
in interfaceBaseConfig
- Returns:
- the interval (in seconds) in which connectors are pinged
-
getConnectorPingTimeout
public long getConnectorPingTimeout()Description copied from interface:BaseConfig
Returns the timeout (in seconds) after which a connector ping is considered invalid/timed out- Specified by:
getConnectorPingTimeout
in interfaceBaseConfig
- Returns:
- the timeout (in seconds) after which a connector ping is considered invalid/timed out
-
getDiscoveryLiteCheckInterval
public long getDiscoveryLiteCheckInterval() -
getClusterSyncServiceTimeoutMillis
public long getClusterSyncServiceTimeoutMillis()Description copied from interface:DiscoveryLiteConfig
Returns the timeout (in milliseconds) to be used when waiting for the sync tokens or id mapping- Specified by:
getClusterSyncServiceTimeoutMillis
in interfaceDiscoveryLiteConfig
- Returns:
- the timeout (in milliseconds) to be used when waiting for the sync tokens or id mapping
-
getClusterSyncServiceIntervalMillis
public long getClusterSyncServiceIntervalMillis()Description copied from interface:DiscoveryLiteConfig
Returns the interval (in milliseconds) to be used when waiting for the sync tokens or id mapping- Specified by:
getClusterSyncServiceIntervalMillis
in interfaceDiscoveryLiteConfig
- Returns:
- the interval (in milliseconds) to be used when waiting for the sync tokens or id mapping
-
getSyncTokenEnabled
public boolean getSyncTokenEnabled() -
isInvertLeaderElectionPrefixOrder
public boolean isInvertLeaderElectionPrefixOrder() -
getLeaderElectionPrefix
public long getLeaderElectionPrefix() -
getSuppressPartiallyStartedInstances
public boolean getSuppressPartiallyStartedInstances() -
getSuppressionTimeoutSeconds
public long getSuppressionTimeoutSeconds() -
getJoinerDelayMillis
public long getJoinerDelayMillis()
-