public final class ConfigValidator extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkAdvancedNetworkConfig(Config config) |
static boolean |
checkAndLogPropertyDeprecated(HazelcastProperties properties,
HazelcastProperty hazelcastProperty)
Checks if given group property is defined within given Hazelcast properties.
|
static <C extends AbstractBasicConfig> |
checkBasicConfig(C basicConfig,
SplitBrainMergePolicyProvider mergePolicyProvider)
Validates the given
AbstractBasicConfig implementation. |
static void |
checkCacheConfig(CacheConfig cacheConfig,
CacheMergePolicyProvider mergePolicyProvider)
Validates the given
CacheConfig . |
static void |
checkCacheConfig(CacheSimpleConfig cacheSimpleConfig,
CacheMergePolicyProvider mergePolicyProvider)
Validates the given
CacheSimpleConfig . |
static void |
checkCacheConfig(InMemoryFormat inMemoryFormat,
EvictionConfig evictionConfig,
String mergePolicyClassname,
SplitBrainMergeTypeProvider mergeTypeProvider,
CacheMergePolicyProvider mergePolicyProvider)
Validates the given parameters in the context of an
ICache config. |
static void |
checkCollectionConfig(CollectionConfig collectionConfig,
SplitBrainMergePolicyProvider mergePolicyProvider)
Validates the given
CollectionConfig . |
static void |
checkCPSubsystemConfig(CPSubsystemConfig config) |
static void |
checkEvictionConfig(EvictionConfig evictionConfig,
boolean isNearCache)
Checks if a
EvictionConfig is valid in its context. |
static void |
checkEvictionConfig(EvictionPolicy evictionPolicy,
String comparatorClassName,
Object comparator,
boolean isNearCache)
Checks if parameters for an
EvictionConfig are valid in their context. |
static void |
checkMapConfig(MapConfig mapConfig,
MergePolicyProvider mergePolicyProvider)
Validates the given
MapConfig . |
static void |
checkMultiMapConfig(MultiMapConfig multiMapConfig,
SplitBrainMergePolicyProvider mergePolicyProvider)
Validates the given
MultiMapConfig . |
static void |
checkNearCacheConfig(String mapName,
NearCacheConfig nearCacheConfig,
NativeMemoryConfig nativeMemoryConfig,
boolean isClient)
Checks preconditions to create a map proxy with Near Cache.
|
static void |
checkQueueConfig(QueueConfig queueConfig,
SplitBrainMergePolicyProvider mergePolicyProvider)
Validates the given
QueueConfig . |
static void |
checkReplicatedMapConfig(ReplicatedMapConfig replicatedMapConfig,
MergePolicyProvider mergePolicyProvider)
Validates the given
ReplicatedMapConfig . |
static void |
checkRingbufferConfig(RingbufferConfig ringbufferConfig,
SplitBrainMergePolicyProvider mergePolicyProvider)
Validates the given
RingbufferConfig . |
static void |
checkScheduledExecutorConfig(ScheduledExecutorConfig scheduledExecutorConfig,
SplitBrainMergePolicyProvider mergePolicyProvider)
Validates the given
ScheduledExecutorConfig . |
static void |
ensurePropertyNotConfigured(HazelcastProperties properties,
HazelcastProperty hazelcastProperty)
Throws
ConfigurationException if given group property is defined within Hazelcast properties. |
public static void checkMapConfig(MapConfig mapConfig, MergePolicyProvider mergePolicyProvider)
MapConfig
.mapConfig
- the MapConfig
mergePolicyProvider
- the MergePolicyProvider
to resolve merge policy classespublic static void checkAdvancedNetworkConfig(Config config)
public static void checkNearCacheConfig(String mapName, NearCacheConfig nearCacheConfig, NativeMemoryConfig nativeMemoryConfig, boolean isClient)
mapName
- name of the map that Near Cache will be created fornearCacheConfig
- the NearCacheConfig
to be checkednativeMemoryConfig
- the NativeMemoryConfig
of the Hazelcast instanceisClient
- true
if the config is for a Hazelcast client, false
otherwisepublic static void checkEvictionConfig(EvictionConfig evictionConfig, boolean isNearCache)
EvictionConfig
is valid in its context.evictionConfig
- the EvictionConfig
isNearCache
- true
if the config is for a Near Cache, false
otherwisepublic static void checkEvictionConfig(EvictionPolicy evictionPolicy, String comparatorClassName, Object comparator, boolean isNearCache)
EvictionConfig
are valid in their context.evictionPolicy
- the EvictionPolicy
for the EvictionConfig
comparatorClassName
- the comparator class name for the EvictionConfig
comparator
- the comparator implementation for the EvictionConfig
isNearCache
- true
if the config is for a Near Cache, false
otherwisepublic static void checkCacheConfig(CacheSimpleConfig cacheSimpleConfig, CacheMergePolicyProvider mergePolicyProvider)
CacheSimpleConfig
.cacheSimpleConfig
- the CacheSimpleConfig
to checkmergePolicyProvider
- the CacheMergePolicyProvider
to resolve merge policy classespublic static void checkCacheConfig(CacheConfig cacheConfig, CacheMergePolicyProvider mergePolicyProvider)
CacheConfig
.cacheConfig
- the CacheConfig
to checkmergePolicyProvider
- the CacheMergePolicyProvider
to resolve merge policy classespublic static void checkCacheConfig(InMemoryFormat inMemoryFormat, EvictionConfig evictionConfig, String mergePolicyClassname, SplitBrainMergeTypeProvider mergeTypeProvider, CacheMergePolicyProvider mergePolicyProvider)
ICache
config.inMemoryFormat
- the InMemoryFormat
of the cacheevictionConfig
- the EvictionConfig
of the cachemergePolicyClassname
- the configured merge policy of the cachemergeTypeProvider
- the SplitBrainMergeTypeProvider
of the cachemergePolicyProvider
- the CacheMergePolicyProvider
to resolve merge policy classespublic static void checkReplicatedMapConfig(ReplicatedMapConfig replicatedMapConfig, MergePolicyProvider mergePolicyProvider)
ReplicatedMapConfig
.replicatedMapConfig
- the ReplicatedMapConfig
to checkmergePolicyProvider
- the MergePolicyProvider
to resolve merge policy classespublic static void checkMultiMapConfig(MultiMapConfig multiMapConfig, SplitBrainMergePolicyProvider mergePolicyProvider)
MultiMapConfig
.multiMapConfig
- the MultiMapConfig
to checkmergePolicyProvider
- the SplitBrainMergePolicyProvider
to resolve merge policy classespublic static void checkQueueConfig(QueueConfig queueConfig, SplitBrainMergePolicyProvider mergePolicyProvider)
QueueConfig
.queueConfig
- the QueueConfig
to checkmergePolicyProvider
- the SplitBrainMergePolicyProvider
to resolve merge policy classespublic static void checkCollectionConfig(CollectionConfig collectionConfig, SplitBrainMergePolicyProvider mergePolicyProvider)
CollectionConfig
.collectionConfig
- the CollectionConfig
to checkmergePolicyProvider
- the SplitBrainMergePolicyProvider
to resolve merge policy classespublic static void checkRingbufferConfig(RingbufferConfig ringbufferConfig, SplitBrainMergePolicyProvider mergePolicyProvider)
RingbufferConfig
.ringbufferConfig
- the RingbufferConfig
to checkmergePolicyProvider
- the SplitBrainMergePolicyProvider
to resolve merge policy classespublic static <C extends AbstractBasicConfig> void checkBasicConfig(C basicConfig, SplitBrainMergePolicyProvider mergePolicyProvider)
AbstractBasicConfig
implementation.C
- type of the AbstractBasicConfig
basicConfig
- the AbstractBasicConfig
to checkmergePolicyProvider
- the SplitBrainMergePolicyProvider
to resolve merge policy classespublic static void checkScheduledExecutorConfig(ScheduledExecutorConfig scheduledExecutorConfig, SplitBrainMergePolicyProvider mergePolicyProvider)
ScheduledExecutorConfig
.scheduledExecutorConfig
- the ScheduledExecutorConfig
to checkmergePolicyProvider
- the SplitBrainMergePolicyProvider
to resolve merge policy classespublic static void checkCPSubsystemConfig(CPSubsystemConfig config)
public static void ensurePropertyNotConfigured(HazelcastProperties properties, HazelcastProperty hazelcastProperty) throws ConfigurationException
ConfigurationException
if given group property is defined within Hazelcast properties.properties
- Group propertieshazelcastProperty
- property to be checkedConfigurationException
public static boolean checkAndLogPropertyDeprecated(HazelcastProperties properties, HazelcastProperty hazelcastProperty)
true
when the property is definedCopyright © 2019 Hazelcast, Inc.. All Rights Reserved.