public class MultiMapConfig extends Object implements IdentifiedDataSerializable, 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) |
int |
getAsyncBackupCount()
Gets the number of asynchronous backups for this MultiMap.
|
int |
getBackupCount()
Gets the number of synchronous backups for this MultiMap.
|
int |
getClassId()
Returns type identifier for this class.
|
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.
|
MergePolicyConfig |
getMergePolicyConfig()
Gets the
MergePolicyConfig for this MultiMap. |
String |
getName()
Gets the name of this MultiMap.
|
String |
getSplitBrainProtectionName()
Returns the split brain protection name for operations.
|
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 |
setSplitBrainProtectionName(String splitBrainProtectionName)
Sets the split brain protection name for operations.
|
MultiMapConfig |
setStatisticsEnabled(boolean statisticsEnabled)
Enables or disables statistics for this MultiMap.
|
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
otherwisepublic 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 getSplitBrainProtectionName()
public MultiMapConfig setSplitBrainProtectionName(String splitBrainProtectionName)
splitBrainProtectionName
- the split brain protection namepublic MergePolicyConfig getMergePolicyConfig()
MergePolicyConfig
for this MultiMap.MergePolicyConfig
for this MultiMappublic MultiMapConfig setMergePolicyConfig(MergePolicyConfig mergePolicyConfig)
MergePolicyConfig
for this MultiMap.public int getFactoryId()
IdentifiedDataSerializable
getFactoryId
in interface IdentifiedDataSerializable
public int getClassId()
IdentifiedDataSerializable
getClassId
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 © 2024 Hazelcast, Inc.. All rights reserved.