public class MultiMapConfig extends Object implements SplitBrainMergeTypeProvider, IdentifiedDataSerializable, Versioned, NamedConfig
Modifier and Type | Class and Description |
---|---|
static class |
MultiMapConfig.ValueCollectionType
Type of value collection
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ASYNC_BACKUP_COUNT
The default number of asynchronous backups for this MultiMap.
|
static int |
DEFAULT_SYNC_BACKUP_COUNT
The default number of synchronous backups for this MultiMap.
|
static MultiMapConfig.ValueCollectionType |
DEFAULT_VALUE_COLLECTION_TYPE
Default value collection type of this MultiMap.
|
Constructor and Description |
---|
MultiMapConfig() |
MultiMapConfig(MultiMapConfig config) |
MultiMapConfig(String name) |
Modifier and Type | Method and Description |
---|---|
MultiMapConfig |
addEntryListenerConfig(EntryListenerConfig listenerConfig)
Adds an entry listener to this MultiMap (listens for when entries are added or removed).
|
boolean |
equals(Object o) |
MultiMapConfigReadOnly |
getAsReadOnly()
Deprecated.
this method will be removed in 4.0; it is meant for internal usage only
|
int |
getAsyncBackupCount()
Gets the number of asynchronous backups for this MultiMap.
|
int |
getBackupCount()
Gets the number of synchronous backups for this MultiMap.
|
List<EntryListenerConfig> |
getEntryListenerConfigs()
Gets the list of entry listeners (listens for when entries are added or removed) for this MultiMap.
|
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
int |
getId()
Returns type identifier for this class.
|
MergePolicyConfig |
getMergePolicyConfig()
Gets the
MergePolicyConfig for this MultiMap. |
String |
getName()
Gets the name of this MultiMap.
|
Class |
getProvidedMergeTypes() |
String |
getQuorumName()
Returns the quorum name for operations.
|
int |
getSyncBackupCount()
Deprecated.
|
int |
getTotalBackupCount()
Gets the total number of backups (synchronous + asynchronous) for this MultiMap.
|
MultiMapConfig.ValueCollectionType |
getValueCollectionType()
Gets the collection type for the values of this MultiMap.
|
int |
hashCode() |
boolean |
isBinary()
Checks if the MultiMap is in binary (serialized) form.
|
boolean |
isStatisticsEnabled()
Checks to see if statistics are enabled for this MultiMap.
|
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
MultiMapConfig |
setAsyncBackupCount(int asyncBackupCount)
Sets the number of asynchronous backups.
|
MultiMapConfig |
setBackupCount(int backupCount)
Sets the number of synchronous backups.
|
MultiMapConfig |
setBinary(boolean binary)
Enables or disables binary (serialized) form for this MultiMap.
|
MultiMapConfig |
setEntryListenerConfigs(List<EntryListenerConfig> listenerConfigs)
Sets the list of entry listeners (listens for when entries are added or removed) for this MultiMap.
|
MultiMapConfig |
setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
Sets the
MergePolicyConfig for this MultiMap. |
MultiMapConfig |
setName(String name)
Sets the name of this MultiMap.
|
MultiMapConfig |
setQuorumName(String quorumName)
Sets the quorum name for operations.
|
MultiMapConfig |
setStatisticsEnabled(boolean statisticsEnabled)
Enables or disables statistics for this MultiMap.
|
MultiMapConfig |
setSyncBackupCount(int syncBackupCount)
Deprecated.
|
MultiMapConfig |
setValueCollectionType(MultiMapConfig.ValueCollectionType valueCollectionType)
Sets the collection type for the values of this MultiMap.
|
MultiMapConfig |
setValueCollectionType(String valueCollectionType)
Sets the collection type for the values of this MultiMap.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public static final int DEFAULT_SYNC_BACKUP_COUNT
public static final int DEFAULT_ASYNC_BACKUP_COUNT
public static final MultiMapConfig.ValueCollectionType DEFAULT_VALUE_COLLECTION_TYPE
public MultiMapConfig()
public MultiMapConfig(String name)
public MultiMapConfig(MultiMapConfig config)
public String getName()
getName
in interface NamedConfig
public MultiMapConfig setName(String name)
setName
in interface NamedConfig
name
- the name to set for this MultiMappublic MultiMapConfig.ValueCollectionType getValueCollectionType()
public MultiMapConfig setValueCollectionType(String valueCollectionType)
valueCollectionType
- the collection type for the values of this MultiMap (SET or LIST)public MultiMapConfig setValueCollectionType(MultiMapConfig.ValueCollectionType valueCollectionType)
valueCollectionType
- the collection type for the values of this MultiMap (SET or LIST)public MultiMapConfig addEntryListenerConfig(EntryListenerConfig listenerConfig)
listenerConfig
- the entry listener to add to this MultiMappublic List<EntryListenerConfig> getEntryListenerConfigs()
public MultiMapConfig setEntryListenerConfigs(List<EntryListenerConfig> listenerConfigs)
listenerConfigs
- the list of entry listeners for this MultiMappublic boolean isBinary()
true
if the MultiMap is in binary (serialized) form, false
otherwisepublic MultiMapConfig setBinary(boolean binary)
binary
- true
to set the MultiMap to binary (serialized) form, false
otherwise@Deprecated public int getSyncBackupCount()
@Deprecated public MultiMapConfig setSyncBackupCount(int syncBackupCount)
public int getBackupCount()
public MultiMapConfig setBackupCount(int backupCount)
backupCount
- the number of synchronous backups to set for this MultiMapIllegalArgumentException
- if backupCount smaller than 0,
or larger than the maximum number of backup
or the sum of the backups and async backups is larger than the maximum number of backupssetAsyncBackupCount(int)
public int getAsyncBackupCount()
public MultiMapConfig setAsyncBackupCount(int asyncBackupCount)
asyncBackupCount
- the number of asynchronous synchronous backups to setIllegalArgumentException
- if asyncBackupCount smaller than 0,
or larger than the maximum number of backup
or the sum of the backups and async backups is larger than the maximum number of backupssetBackupCount(int)
,
getAsyncBackupCount()
public int getTotalBackupCount()
public boolean isStatisticsEnabled()
true
if statistics are enabled for this MultiMap, false
otherwisepublic MultiMapConfig setStatisticsEnabled(boolean statisticsEnabled)
statisticsEnabled
- true
to enable statistics for this MultiMap, false
to disablepublic String getQuorumName()
public MultiMapConfig setQuorumName(String quorumName)
quorumName
- the quorum namepublic MergePolicyConfig getMergePolicyConfig()
MergePolicyConfig
for this MultiMap.MergePolicyConfig
for this MultiMappublic MultiMapConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
MergePolicyConfig
for this MultiMap.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.public MultiMapConfigReadOnly getAsReadOnly()
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.