Package com.hazelcast.spi.merge
Class NamespaceAwareSplitBrainMergePolicyProvider
java.lang.Object
com.hazelcast.spi.merge.SplitBrainMergePolicyProvider
com.hazelcast.spi.merge.NamespaceAwareSplitBrainMergePolicyProvider
public final class NamespaceAwareSplitBrainMergePolicyProvider
extends SplitBrainMergePolicyProvider
A provider for
SplitBrainMergePolicy
instances that supports namespace awareness.
Registers both out-of-the-box merge policies, identified by their fully qualified and simple class names, and custom merge policies based on the user-defined namespace container name.
- Since:
- 6.0
-
Field Summary
Fields inherited from class com.hazelcast.spi.merge.SplitBrainMergePolicyProvider
mergePolicyMap, OUT_OF_THE_BOX_MERGE_POLICIES
-
Constructor Summary
ConstructorDescriptionNamespaceAwareSplitBrainMergePolicyProvider
(com.hazelcast.spi.impl.NodeEngine nodeEngine) Constructs a new provider forSplitBrainMergePolicy
classes. -
Method Summary
Modifier and TypeMethodDescriptiongetMergePolicy
(String className, String namespace) Resolves theSplitBrainMergePolicy
class by its classname within the specified namespace.Methods inherited from class com.hazelcast.spi.merge.SplitBrainMergePolicyProvider
getBuiltInMergePolicy, isPredefinedMergePolicy
-
Constructor Details
-
NamespaceAwareSplitBrainMergePolicyProvider
public NamespaceAwareSplitBrainMergePolicyProvider(com.hazelcast.spi.impl.NodeEngine nodeEngine) Constructs a new provider forSplitBrainMergePolicy
classes.- Parameters:
nodeEngine
- theNodeEngine
to retrieve the classloader from
-
-
Method Details
-
getMergePolicy
Resolves theSplitBrainMergePolicy
class by its classname within the specified namespace. If the namespace isnull
, the default namespace is used.- Overrides:
getMergePolicy
in classSplitBrainMergePolicyProvider
- Parameters:
className
- the merge policy classname to resolvenamespace
- user namespace container name- Returns:
- the resolved
SplitBrainMergePolicy
class - Throws:
InvalidConfigurationException
- when the classname could not be resolved
-