public class DiscoveryQos extends Object
| Modifier and Type | Field and Description |
|---|---|
static DiscoveryQos |
NO_FILTER |
static long |
NO_MAX_AGE |
static long |
NO_VALUE |
| Constructor and Description |
|---|
DiscoveryQos() |
DiscoveryQos(DiscoveryQos other) |
DiscoveryQos(long discoveryTimeout,
ArbitrationStrategyFunction arbitrationStrategyFunction,
long cacheMaxAge) |
DiscoveryQos(long discoveryTimeout,
ArbitrationStrategyFunction arbitrationStrategyFunction,
long cacheMaxAge,
DiscoveryScope discoveryScope) |
DiscoveryQos(long discoveryTimeout,
ArbitrationStrategy arbitrationStrategy,
long cacheMaxAge) |
DiscoveryQos(long discoveryTimeout,
ArbitrationStrategy arbitrationStrategy,
long cacheMaxAge,
DiscoveryScope discoveryScope) |
DiscoveryQos(long discoveryTimeout,
long retryIntervalMs,
ArbitrationStrategyFunction arbitrationStrategyFunction,
long cacheMaxAge,
DiscoveryScope discoveryScope) |
DiscoveryQos(long discoveryTimeout,
long retryIntervalMs,
ArbitrationStrategy arbitrationStrategy,
long cacheMaxAge,
DiscoveryScope discoveryScope) |
| Modifier and Type | Method and Description |
|---|---|
void |
addCustomParameter(String key,
String value)
addCustomParameter allows to add special parameters to the DiscoveryQos which will be used only by some
strategies.
|
ArbitrationStrategy |
getArbitrationStrategy()
The discovery process outputs a list of matching providers.
|
long |
getCacheMaxAgeMs()
Provider entries in the global capabilities directory are cached locally.
|
Object |
getCustomParameter(String key)
getCustomParameter returns the parameters previously specified by addParameter
|
Map<String,String> |
getCustomParameters() |
DiscoveryScope |
getDiscoveryScope() |
long |
getDiscoveryTimeoutMs()
As soon as the arbitration QoS is set on the proxy builder, discovery of suitable providers is triggered.
|
boolean |
getProviderMustSupportOnChange()
Indicates if arbitration should only consider providers that support onChange subscriptions
|
long |
getRetryIntervalMs() |
boolean |
isLocalOnly() |
void |
setArbitrationStrategy(ArbitrationStrategy arbitrationStrategy)
The discovery process outputs a list of matching providers.
|
void |
setCacheMaxAgeMs(long cacheMaxAgeMs)
Provider entries in the global capabilities directory are cached locally.
|
void |
setDiscoveryScope(DiscoveryScope discoveryScope) |
void |
setDiscoveryTimeoutMs(long discoveryTimeoutMs)
As soon as the arbitration QoS is set on the proxy builder, discovery of suitable providers is triggered.
|
void |
setProviderMustSupportOnChange(boolean providerMustSupportOnChange)
Indicates if arbitration should only consider providers that support onChange subscriptions
|
void |
setRetryIntervalMs(long retryIntervalMs) |
String |
toString()
Stringifies the class excluding arbitrationStrategyFunction
|
public static final DiscoveryQos NO_FILTER
public static final long NO_MAX_AGE
public static final long NO_VALUE
public DiscoveryQos()
public DiscoveryQos(DiscoveryQos other)
public DiscoveryQos(long discoveryTimeout,
ArbitrationStrategy arbitrationStrategy,
long cacheMaxAge)
discoveryTimeout - Timeout for rpc calls to wait for arbitration to finish.arbitrationStrategy - Strategy for choosing the appropriate provider from the list returned by the capabilities directorycacheMaxAge - Maximum age of entries in the localCapabilitiesDirectory. If this value filters out all entries of the
local capabilities directory a lookup in the global capabilitiesDirectory will take place.public DiscoveryQos(long discoveryTimeout,
ArbitrationStrategyFunction arbitrationStrategyFunction,
long cacheMaxAge)
discoveryTimeout - Timeout for rpc calls to wait for arbitration to finish.arbitrationStrategyFunction - function that chooses the appropriate provider from the list returned by the capabilities directorycacheMaxAge - Maximum age of entries in the localCapabilitiesDirectory. If this value filters out all entries of the
local capabilities directory a lookup in the global capabilitiesDirectory will take place.public DiscoveryQos(long discoveryTimeout,
ArbitrationStrategy arbitrationStrategy,
long cacheMaxAge,
DiscoveryScope discoveryScope)
discoveryTimeout - Timeout for rpc calls to wait for arbitration to finish.arbitrationStrategy - Strategy for choosing the appropriate provider from the list returned by the capabilities directorycacheMaxAge - Maximum age of entries in the localCapabilitiesDirectory. If this value filters out all entries of the
local capabilities directory a lookup in the global capabilitiesDirectory will take place.discoveryScope - determines where the discovery process will look for matching providerspublic DiscoveryQos(long discoveryTimeout,
long retryIntervalMs,
ArbitrationStrategy arbitrationStrategy,
long cacheMaxAge,
DiscoveryScope discoveryScope)
discoveryTimeout - Timeout for rpc calls to wait for arbitration to finish.retryIntervalMs - Lookups for the arbitration will be repeated after this time interval if they were not successful. The
actual delay may be longer, as there is a system-wide minimum delay (see
ConfigurableMessagingSettings.PROPERTY_DISCOVERY_MINIMUM_RETRY_INTERVAL_MS).arbitrationStrategy - Strategy for choosing the appropriate provider from the list returned by the capabilities directorycacheMaxAge - Maximum age of entries in the localCapabilitiesDirectory. If this value filters out all entries of the
local capabilities directory a lookup in the global capabilitiesDirectory will take place.discoveryScope - determines where the discovery process will look for matching providerspublic DiscoveryQos(long discoveryTimeout,
ArbitrationStrategyFunction arbitrationStrategyFunction,
long cacheMaxAge,
DiscoveryScope discoveryScope)
discoveryTimeout - Timeout for rpc calls to wait for arbitration to finish.arbitrationStrategyFunction - function that chooses the appropriate provider from the list returned by the capabilities directorycacheMaxAge - Maximum age of entries in the localCapabilitiesDirectory. If this value filters out all entries of the
local capabilities directory a lookup in the global capabilitiesDirectory will take place.discoveryScope - determines where the discovery process will look for matching providerspublic DiscoveryQos(long discoveryTimeout,
long retryIntervalMs,
ArbitrationStrategyFunction arbitrationStrategyFunction,
long cacheMaxAge,
DiscoveryScope discoveryScope)
discoveryTimeout - Timeout for rpc calls to wait for arbitration to finish.retryIntervalMs - Lookups for the arbitration will be repeated after this time interval if they were not successful. The
actual delay may be longer, as there is a system-wide minimum delay (see
ConfigurableMessagingSettings.PROPERTY_DISCOVERY_MINIMUM_RETRY_INTERVAL_MS).arbitrationStrategyFunction - function that chooses the appropriate provider from the list returned by the capabilities directorycacheMaxAge - Maximum age of entries in the localCapabilitiesDirectory. If this value filters out all entries of the
local capabilities directory a lookup in the global capabilitiesDirectory will take place.discoveryScope - determines where the discovery process will look for matching providerspublic void setArbitrationStrategy(ArbitrationStrategy arbitrationStrategy)
arbitrationStrategy - Defines the strategy used to choose the "best" provider.public ArbitrationStrategy getArbitrationStrategy()
public void setDiscoveryTimeoutMs(long discoveryTimeoutMs)
discoveryTimeoutMs - Sets the amount of time the arbitrator keeps trying to find a suitable provider. The arbitration
lookup might happen multiple times during this time span.public long getDiscoveryTimeoutMs()
public void addCustomParameter(String key, String value)
key - String to identify the arbitration parametervalue - Any object used by the arbitrator to choose a provider.public Object getCustomParameter(String key)
key - key to identify the custom parameterpublic long getCacheMaxAgeMs()
NOTE: Valid cache entries might prevent triggering a lookup in the global capabilities directory. Therefore, providers registered with the global capabilities after the last lookup and before the cacheMaxAge expires will not be discovered.
public void setCacheMaxAgeMs(long cacheMaxAgeMs)
NOTE: Valid cache entries might prevent triggering a lookup in the global capabilities directory. Therefore, providers registered with the global capabilities after the last lookup and before the cacheMaxAge expires will not be discovered.
cacheMaxAgeMs - Maximum age of entries in the localCapabilitiesDirectory. If this value filters out all entries of the
local capabilities directory a lookup in the global capabilitiesDirectory will take place.public boolean isLocalOnly()
public long getRetryIntervalMs()
public void setRetryIntervalMs(long retryIntervalMs)
retryIntervalMs - The time to wait between discovery retries after unsuccessful discovery attempts. The actual delay may
be longer, as there is a system-wide minimum delay (see
ConfigurableMessagingSettings.PROPERTY_DISCOVERY_MINIMUM_RETRY_INTERVAL_MS).public boolean getProviderMustSupportOnChange()
public void setProviderMustSupportOnChange(boolean providerMustSupportOnChange)
providerMustSupportOnChange - true if only providers that support onChange subscriptions should be consideredpublic void setDiscoveryScope(DiscoveryScope discoveryScope)
discoveryScope - selects capability registries to choose from for provider discoverypublic DiscoveryScope getDiscoveryScope()
Copyright © 2021. All rights reserved.