Package com.hazelcast.config
Class ReplicatedMapConfig
java.lang.Object
com.hazelcast.config.ReplicatedMapConfig
- All Implemented Interfaces:
NamedConfig
,DataSerializable
,IdentifiedDataSerializable
public class ReplicatedMapConfig extends Object implements IdentifiedDataSerializable, NamedConfig
Contains the configuration for an
ReplicatedMap
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEFAULT_ASNYC_FILLUP
Default value of asynchronous fill upstatic InMemoryFormat
DEFAULT_IN_MEMORY_FORMAT
Default value of In-memory format -
Constructor Summary
Constructors Constructor Description ReplicatedMapConfig()
ReplicatedMapConfig(ReplicatedMapConfig replicatedMapConfig)
ReplicatedMapConfig(String name)
Creates a ReplicatedMapConfig with the given name. -
Method Summary
Modifier and Type Method Description ReplicatedMapConfig
addEntryListenerConfig(EntryListenerConfig listenerConfig)
boolean
equals(Object o)
int
getClassId()
Returns type identifier for this class.int
getFactoryId()
Returns DataSerializableFactory factory ID for this class.InMemoryFormat
getInMemoryFormat()
Data type used to store entries.List<ListenerConfig>
getListenerConfigs()
MergePolicyConfig
getMergePolicyConfig()
Gets theMergePolicyConfig
for this replicated map.String
getName()
Returns the name of thisReplicatedMap
.String
getSplitBrainProtectionName()
Returns the split brain protection name for operations.int
hashCode()
boolean
isAsyncFillup()
True if the replicated map is available for reads before the initial replication is completed, false otherwise.boolean
isStatisticsEnabled()
Checks if statistics are enabled for this replicated map.void
readData(ObjectDataInput in)
Reads fields from the input streamReplicatedMapConfig
setAsyncFillup(boolean asyncFillup)
True if the replicated map is available for reads before the initial replication is completed, false otherwise.ReplicatedMapConfig
setInMemoryFormat(InMemoryFormat inMemoryFormat)
Data type used to store entries.ReplicatedMapConfig
setListenerConfigs(List<ListenerConfig> listenerConfigs)
ReplicatedMapConfig
setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
Sets theMergePolicyConfig
for this replicated map.ReplicatedMapConfig
setName(String name)
Sets the name of thisReplicatedMap
.ReplicatedMapConfig
setSplitBrainProtectionName(String splitBrainProtectionName)
Sets the split brain protection name for operations.ReplicatedMapConfig
setStatisticsEnabled(boolean statisticsEnabled)
Sets statistics to enabled or disabled for this replicated map.String
toString()
void
writeData(ObjectDataOutput out)
Writes 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:
- Constant Field Values
-
-
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:
getName
in interfaceNamedConfig
- Returns:
- the name of the
ReplicatedMap
-
setName
Sets the name of thisReplicatedMap
.- Specified by:
setName
in 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:
true
if the replicated map is available for reads before the initial replication is completed,false
otherwise
-
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
-true
if the replicated map is available for reads before the initial replication is completed,false
otherwise- Returns:
- this configuration
-
isStatisticsEnabled
public boolean isStatisticsEnabled()Checks if statistics are enabled for this replicated map.- Returns:
true
if statistics are enabled,false
otherwise
-
setStatisticsEnabled
Sets statistics to enabled or disabled for this replicated map.- Parameters:
statisticsEnabled
-true
to enable replicated map statistics,false
to 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 theMergePolicyConfig
for this replicated map.- Returns:
- the
MergePolicyConfig
for this replicated map
-
setMergePolicyConfig
Sets theMergePolicyConfig
for this replicated map.- Returns:
- the updated replicated map configuration
-
toString
-
getFactoryId
public int getFactoryId()Description copied from interface:IdentifiedDataSerializable
Returns DataSerializableFactory factory ID for this class.- Specified by:
getFactoryId
in interfaceIdentifiedDataSerializable
- Returns:
- factory ID
-
getClassId
public int getClassId()Description copied from interface:IdentifiedDataSerializable
Returns type identifier for this class. It should be unique per DataSerializableFactory.- Specified by:
getClassId
in interfaceIdentifiedDataSerializable
- Returns:
- type ID
-
writeData
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
equals
-
hashCode
public final int hashCode()
-