Package com.hazelcast.config
Class ReplicatedMapConfig
java.lang.Object
com.hazelcast.config.ReplicatedMapConfig
- All Implemented Interfaces:
NamedConfig,UserCodeNamespaceAwareConfig<ReplicatedMapConfig>,DataSerializable,IdentifiedDataSerializable,com.hazelcast.nio.serialization.impl.Versioned
public class ReplicatedMapConfig
extends Object
implements IdentifiedDataSerializable, NamedConfig, com.hazelcast.nio.serialization.impl.Versioned, UserCodeNamespaceAwareConfig<ReplicatedMapConfig>
Contains the configuration for an
ReplicatedMap-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanDefault value of asynchronous fill upstatic final InMemoryFormatDefault value of In-memory formatFields inherited from interface com.hazelcast.config.UserCodeNamespaceAwareConfig
DEFAULT_NAMESPACE -
Constructor Summary
ConstructorsConstructorDescriptionReplicatedMapConfig(ReplicatedMapConfig replicatedMapConfig) ReplicatedMapConfig(String name) Creates a ReplicatedMapConfig with the given name. -
Method Summary
Modifier and TypeMethodDescriptionaddEntryListenerConfig(EntryListenerConfig listenerConfig) final booleanintReturns type identifier for this class.intReturns DataSerializableFactory factory ID for this class.Data type used to store entries.Gets theMergePolicyConfigfor this replicated map.getName()Returns the name of thisReplicatedMap.Returns the split brain protection name for operations.Retrieve the User Code Deployment Namespace to be used forClassLoaderawareness during operations related to the structure associated with this configuration.final inthashCode()booleanTrue if the replicated map is available for reads before the initial replication is completed, false otherwise.booleanChecks if statistics are enabled for this replicated map.voidReads fields from the input streamsetAsyncFillup(boolean asyncFillup) True if the replicated map is available for reads before the initial replication is completed, false otherwise.setInMemoryFormat(InMemoryFormat inMemoryFormat) Data type used to store entries.setListenerConfigs(List<ListenerConfig> listenerConfigs) setMergePolicyConfig(MergePolicyConfig mergePolicyConfig) Sets theMergePolicyConfigfor this replicated map.Sets the name of thisReplicatedMap.setSplitBrainProtectionName(String splitBrainProtectionName) Sets the split brain protection name for operations.setStatisticsEnabled(boolean statisticsEnabled) Sets statistics to enabled or disabled for this replicated map.setUserCodeNamespace(String userCodeNamespace) Associates the provided Namespace Name with this structure forClassLoaderawareness.toString()voidWrites object fields to output stream
-
Field Details
-
DEFAULT_IN_MEMORY_FORMAT
Default value of In-memory format -
DEFAULT_ASNYC_FILLUP
public static final boolean DEFAULT_ASNYC_FILLUPDefault value of asynchronous fill up- See Also:
-
-
Constructor Details
-
ReplicatedMapConfig
public ReplicatedMapConfig() -
ReplicatedMapConfig
Creates a ReplicatedMapConfig with the given name.- Parameters:
name- the name of the ReplicatedMap
-
ReplicatedMapConfig
-
-
Method Details
-
getName
Returns the name of thisReplicatedMap.- Specified by:
getNamein interfaceNamedConfig- Returns:
- the name of the
ReplicatedMap
-
setName
Sets the name of thisReplicatedMap.- Specified by:
setNamein interfaceNamedConfig- Parameters:
name- the name of theReplicatedMap- Returns:
- the current replicated map config instance
-
getInMemoryFormat
Data type used to store entries.Possible values:
- BINARY: keys and values are stored as binary data
- OBJECT (default): values are stored in their object forms
- NATIVE: keys and values are stored in native memory
- Returns:
- Data type used to store entries
-
setInMemoryFormat
Data type used to store entries.Possible values:
- BINARY: keys and values are stored as binary data
- OBJECT (default): values are stored in their object forms
- NATIVE: keys and values are stored in native memory
- Parameters:
inMemoryFormat- Data type used to store entries- Returns:
- the current replicated map config instance
-
getListenerConfigs
-
setListenerConfigs
-
addEntryListenerConfig
-
isAsyncFillup
public boolean isAsyncFillup()True if the replicated map is available for reads before the initial replication is completed, false otherwise. Default is true. If false, no Exception will be thrown when the replicated map is not yet ready, but `null` values can be seen until the initial replication is completed.- Returns:
trueif the replicated map is available for reads before the initial replication is completed,falseotherwise
-
setAsyncFillup
True if the replicated map is available for reads before the initial replication is completed, false otherwise. Default is true. If false, no Exception will be thrown when the replicated map is not yet ready, but `null` values can be seen until the initial replication is completed.- Parameters:
asyncFillup-trueif the replicated map is available for reads before the initial replication is completed,falseotherwise- Returns:
- this configuration
-
isStatisticsEnabled
public boolean isStatisticsEnabled()Checks if statistics are enabled for this replicated map.- Returns:
trueif statistics are enabled,falseotherwise
-
setStatisticsEnabled
Sets statistics to enabled or disabled for this replicated map.- Parameters:
statisticsEnabled-trueto enable replicated map statistics,falseto disable- Returns:
- the current replicated map config instance
-
getSplitBrainProtectionName
Returns the split brain protection name for operations.- Returns:
- the split brain protection name
-
setSplitBrainProtectionName
Sets the split brain protection name for operations.- Parameters:
splitBrainProtectionName- the split brain protection name- Returns:
- the updated configuration
-
getMergePolicyConfig
Gets theMergePolicyConfigfor this replicated map.- Returns:
- the
MergePolicyConfigfor this replicated map
-
setMergePolicyConfig
Sets theMergePolicyConfigfor this replicated map.- Returns:
- the updated replicated map configuration
-
getUserCodeNamespace
Retrieve the User Code Deployment Namespace to be used forClassLoaderawareness during operations related to the structure associated with this configuration.- Specified by:
getUserCodeNamespacein interfaceUserCodeNamespaceAwareConfig<ReplicatedMapConfig>- Returns:
- Namespace Name for use with the
UserCodeNamespaceService, ornullif there is no User Code Namespace to associate with.
-
setUserCodeNamespace
Associates the provided Namespace Name with this structure forClassLoaderawareness.The behaviour of setting this to
nullis outlined in the documentation forUserCodeNamespaceAwareConfig.DEFAULT_NAMESPACE.- Specified by:
setUserCodeNamespacein interfaceUserCodeNamespaceAwareConfig<ReplicatedMapConfig>- Parameters:
userCodeNamespace- The ID of the Namespace to associate with this structure.- Returns:
- the updated
ReplicatedMapConfiginstance - Since:
- 5.4
-
toString
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializableReturns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryIdin interfaceIdentifiedDataSerializable- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializableReturns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassIdin interfaceIdentifiedDataSerializable- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializableWrites object fields to output stream- Specified by:
writeDatain interfaceDataSerializable- Parameters:
out- output- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializableReads fields from the input stream- Specified by:
readDatain interfaceDataSerializable- Parameters:
in- input- Throws:
IOException- if an I/O error occurs. In particular, anIOExceptionmay be thrown if the input stream has been closed.
-
equals
-
hashCode
public final int hashCode()
-