public class HazelcastKubernetesDiscoveryStrategyFactory extends Object implements DiscoveryStrategyFactory
DiscoveryStrategyFactory.DiscoveryStrategyLevel
Constructor and Description |
---|
HazelcastKubernetesDiscoveryStrategyFactory() |
Modifier and Type | Method and Description |
---|---|
DiscoveryStrategyFactory.DiscoveryStrategyLevel |
discoveryStrategyLevel()
Level of the discovery strategy.
|
Collection<PropertyDefinition> |
getConfigurationProperties()
Returns a set of the expected configuration properties.
|
Class<? extends DiscoveryStrategy> |
getDiscoveryStrategyType()
Returns the type of the
DiscoveryStrategy itself. |
boolean |
isAutoDetectionApplicable()
In all Kubernetes environments the file "/var/run/secrets/kubernetes.io/serviceaccount/token" is injected into the
container.
|
DiscoveryStrategy |
newDiscoveryStrategy(DiscoveryNode discoveryNode,
ILogger logger,
Map<String,Comparable> properties)
Instantiates a new instance of the
DiscoveryStrategy with the given configuration
properties. |
public HazelcastKubernetesDiscoveryStrategyFactory()
public Class<? extends DiscoveryStrategy> getDiscoveryStrategyType()
DiscoveryStrategyFactory
DiscoveryStrategy
itself.getDiscoveryStrategyType
in interface DiscoveryStrategyFactory
public DiscoveryStrategy newDiscoveryStrategy(DiscoveryNode discoveryNode, ILogger logger, Map<String,Comparable> properties)
DiscoveryStrategyFactory
DiscoveryStrategy
with the given configuration
properties. The provided HazelcastInstance
can be used to register instances in
a service registry whenever the discovery strategy is started.newDiscoveryStrategy
in interface DiscoveryStrategyFactory
discoveryNode
- the current local DiscoveryNode
, representing the local
connection information if running on a Hazelcast member, otherwise on
Hazelcast clients always null
logger
- the logger instanceproperties
- the properties parsed from the configurationpublic Collection<PropertyDefinition> getConfigurationProperties()
DiscoveryStrategyFactory
getConfigurationProperties
in interface DiscoveryStrategyFactory
public boolean isAutoDetectionApplicable()
Note that if the Kubernetes environment is not configured correctly, this file my not exist. However, in such case,
this plugin won't work anyway, so it makes perfect sense to return false
.
isAutoDetectionApplicable
in interface DiscoveryStrategyFactory
public DiscoveryStrategyFactory.DiscoveryStrategyLevel discoveryStrategyLevel()
DiscoveryStrategyFactory
discoveryStrategyLevel
in interface DiscoveryStrategyFactory
Copyright © 2024 Hazelcast, Inc.. All rights reserved.