public class ReplicatedMapConfig extends Object implements SplitBrainMergeTypeProvider, IdentifiedDataSerializable, Versioned
ReplicatedMap
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ASNYC_FILLUP
Default value of asynchronous fill up
|
static int |
DEFAULT_CONCURRENCY_LEVEL
Default value of concurrency level
|
static InMemoryFormat |
DEFAULT_IN_MEMORY_FORMAT
Default value of In-memory format
|
static String |
DEFAULT_MERGE_POLICY
Default policy for merging
|
static int |
DEFAULT_REPLICATION_DELAY_MILLIS
Default value of delay of replication in millisecond
|
Constructor and Description |
---|
ReplicatedMapConfig() |
ReplicatedMapConfig(ReplicatedMapConfig replicatedMapConfig) |
ReplicatedMapConfig(String name)
Creates a ReplicatedMapConfig with the given name.
|
Modifier and Type | Method and Description |
---|---|
ReplicatedMapConfig |
addEntryListenerConfig(EntryListenerConfig listenerConfig) |
boolean |
equals(Object o) |
ReplicatedMapConfig |
getAsReadOnly()
Deprecated.
this method will be removed in 4.0; it is meant for internal usage only
|
int |
getConcurrencyLevel()
Deprecated.
new implementation doesn't use mutexes
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
InMemoryFormat |
getInMemoryFormat()
Data type used to store entries.
|
List<ListenerConfig> |
getListenerConfigs() |
String |
getMergePolicy()
Deprecated.
since 3.10, please use
getMergePolicyConfig() and MergePolicyConfig.getPolicy() |
MergePolicyConfig |
getMergePolicyConfig()
Gets the
MergePolicyConfig for this replicated map. |
String |
getName()
Returns the name of this
ReplicatedMap . |
Class |
getProvidedMergeTypes() |
String |
getQuorumName()
Returns the quorum name for operations.
|
long |
getReplicationDelayMillis()
Deprecated.
since new implementation will route puts to the partition owner nodes,
caching won't help replication speed because most of the time subsequent puts will end up in different nodes
|
ScheduledExecutorService |
getReplicatorExecutorService()
Deprecated.
new implementation doesn't use executor service for replication
|
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 stream
|
void |
setAsyncFillup(boolean asyncFillup)
True if the replicated map is available for reads before the initial
replication is completed, false otherwise.
|
ReplicatedMapConfig |
setConcurrencyLevel(int concurrencyLevel)
Deprecated.
new implementation doesn't use mutexes
|
ReplicatedMapConfig |
setInMemoryFormat(InMemoryFormat inMemoryFormat)
Data type used to store entries.
|
ReplicatedMapConfig |
setListenerConfigs(List<ListenerConfig> listenerConfigs) |
ReplicatedMapConfig |
setMergePolicy(String mergePolicy)
Deprecated.
since 3.10, please use
setMergePolicyConfig(MergePolicyConfig) |
ReplicatedMapConfig |
setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
Sets the
MergePolicyConfig for this replicated map. |
ReplicatedMapConfig |
setName(String name)
Sets the name of this
ReplicatedMap . |
ReplicatedMapConfig |
setQuorumName(String quorumName)
Sets the quorum name for operations.
|
ReplicatedMapConfig |
setReplicationDelayMillis(long replicationDelayMillis)
Deprecated.
since new implementation will route puts to the partition owner nodes,
caching won't help replication speed because most of the time subsequent puts will end up in different nodes
|
ReplicatedMapConfig |
setReplicatorExecutorService(ScheduledExecutorService replicatorExecutorService)
Deprecated.
new implementation doesn't use executor service for replication
|
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
|
public static final int DEFAULT_CONCURRENCY_LEVEL
public static final int DEFAULT_REPLICATION_DELAY_MILLIS
public static final InMemoryFormat DEFAULT_IN_MEMORY_FORMAT
public static final boolean DEFAULT_ASNYC_FILLUP
public static final String DEFAULT_MERGE_POLICY
public ReplicatedMapConfig()
public ReplicatedMapConfig(String name)
name
- the name of the ReplicatedMappublic ReplicatedMapConfig(ReplicatedMapConfig replicatedMapConfig)
public String getName()
ReplicatedMap
.ReplicatedMap
public ReplicatedMapConfig setName(String name)
ReplicatedMap
.name
- the name of the ReplicatedMap
@Deprecated public long getReplicationDelayMillis()
The default value is 100ms before a replication is operated. If set to 0, no delay is used and all values are replicated one by one.
@Deprecated public ReplicatedMapConfig setReplicationDelayMillis(long replicationDelayMillis)
The default value is 100ms before a replication is operated. If set to 0, no delay is used and all values are replicated one by one.
replicationDelayMillis
- the number of milliseconds after a put is executed before the value is replicated
to other nodes@Deprecated public int getConcurrencyLevel()
@Deprecated public ReplicatedMapConfig setConcurrencyLevel(int concurrencyLevel)
concurrencyLevel
- Number of parallel mutexes to minimize contention on keyspublic InMemoryFormat getInMemoryFormat()
Possible values:
public ReplicatedMapConfig setInMemoryFormat(InMemoryFormat inMemoryFormat)
Possible values:
inMemoryFormat
- Data type used to store entries@Deprecated public ScheduledExecutorService getReplicatorExecutorService()
@Deprecated public ReplicatedMapConfig setReplicatorExecutorService(ScheduledExecutorService replicatorExecutorService)
public List<ListenerConfig> getListenerConfigs()
public ReplicatedMapConfig setListenerConfigs(List<ListenerConfig> listenerConfigs)
public ReplicatedMapConfig addEntryListenerConfig(EntryListenerConfig listenerConfig)
public boolean isAsyncFillup()
true
if the replicated map is available for reads before the initial
replication is completed, false
otherwisepublic void setAsyncFillup(boolean asyncFillup)
asyncFillup
- true
if the replicated map is available for reads before the initial
replication is completed, false
otherwisepublic ReplicatedMapConfig getAsReadOnly()
public boolean isStatisticsEnabled()
true
if statistics are enabled, false
otherwisepublic ReplicatedMapConfig setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled
- true
to enable replicated map statistics, false
to disablepublic String getQuorumName()
public ReplicatedMapConfig setQuorumName(String quorumName)
quorumName
- the quorum namepublic String getMergePolicy()
getMergePolicyConfig()
and MergePolicyConfig.getPolicy()
ReplicatedMapMergePolicy
public ReplicatedMapConfig setMergePolicy(String mergePolicy)
setMergePolicyConfig(MergePolicyConfig)
ReplicatedMapMergePolicy
mergePolicy
- the replicated map merge policy to setpublic MergePolicyConfig getMergePolicyConfig()
MergePolicyConfig
for this replicated map.MergePolicyConfig
for this replicated mappublic ReplicatedMapConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
MergePolicyConfig
for this replicated map.public Class getProvidedMergeTypes()
getProvidedMergeTypes
in interface SplitBrainMergeTypeProvider
public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getId()
IdentifiedDataSerializable
getId
in interface IdentifiedDataSerializable
public void writeData(ObjectDataOutput out) throws IOException
DataSerializable
writeData
in interface DataSerializable
out
- outputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
output stream has been closed.public void readData(ObjectDataInput in) throws IOException
DataSerializable
readData
in interface DataSerializable
in
- inputIOException
- if an I/O error occurs. In particular,
an IOException
may be thrown if the
input stream has been closed.Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.