Package com.hazelcast.spi.merge
Class SplitBrainMergePolicyProvider
java.lang.Object
com.hazelcast.spi.merge.SplitBrainMergePolicyProvider
- Direct Known Subclasses:
NamespaceAwareSplitBrainMergePolicyProvider
A provider for
SplitBrainMergePolicy
instances.
Registers out-of-the-box merge policies by their fully qualified and simple class name.
- Since:
- 3.10
-
Field Summary
Modifier and TypeFieldDescriptionprotected final Map<String,
SplitBrainMergePolicy> protected static final Map<String,
SplitBrainMergePolicy> -
Constructor Summary
ConstructorDescriptionSplitBrainMergePolicyProvider
(ClassLoader configClassLoader) Constructs a new provider forSplitBrainMergePolicy
classes. -
Method Summary
Modifier and TypeMethodDescriptiongetBuiltInMergePolicy
(String className) Resolves theSplitBrainMergePolicy
class by its classname using the application class loader.getMergePolicy
(String className, String namespace) Resolves theSplitBrainMergePolicy
class by its classname using the application class loader.protected boolean
isPredefinedMergePolicy
(String policy)
-
Field Details
-
OUT_OF_THE_BOX_MERGE_POLICIES
-
mergePolicyMap
-
-
Constructor Details
-
SplitBrainMergePolicyProvider
Constructs a new provider forSplitBrainMergePolicy
classes.- Parameters:
configClassLoader
- theClassLoader
used to load instances of merge policies.
-
-
Method Details
-
getBuiltInMergePolicy
Resolves theSplitBrainMergePolicy
class by its classname using the application class loader.- Parameters:
className
- the merge policy classname to resolve- Returns:
- the resolved
SplitBrainMergePolicy
class - Throws:
InvalidConfigurationException
- when the classname could not be resolved
-
getMergePolicy
Resolves theSplitBrainMergePolicy
class by its classname using the application class loader. Namespace is ignored, but provided for children to implement- Parameters:
className
- the merge policy classname to resolvenamespace
- user code namespace name- Returns:
- the resolved
SplitBrainMergePolicy
class - Throws:
InvalidConfigurationException
- when the classname could not be resolved
-
isPredefinedMergePolicy
-