public class MergePolicyConfig extends Object implements IdentifiedDataSerializable
SplitBrainMergePolicy.| Modifier and Type | Field and Description | 
|---|---|
static int | 
DEFAULT_BATCH_SIZE
Default batch size. 
 | 
static String | 
DEFAULT_MERGE_POLICY
Default merge policy. 
 | 
| Constructor and Description | 
|---|
MergePolicyConfig()  | 
MergePolicyConfig(MergePolicyConfig mergePolicyConfig)  | 
MergePolicyConfig(String policy,
                 int batchSize)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
equals(Object o)  | 
int | 
getBatchSize()
Returns the batch size, which will be used to determine
 the number of entries to be sent in a merge operation. 
 | 
int | 
getClassId()
Returns type identifier for this class. 
 | 
int | 
getFactoryId()
Returns DataSerializableFactory factory ID for this class. 
 | 
String | 
getPolicy()
Returns the classname of the  
SplitBrainMergePolicy. | 
int | 
hashCode()  | 
void | 
readData(ObjectDataInput in)
Reads fields from the input stream 
 | 
MergePolicyConfig | 
setBatchSize(int batchSize)
Sets the batch size, which will be used to determine
 the number of entries to be sent in a merge operation. 
 | 
MergePolicyConfig | 
setPolicy(String policy)
Sets the classname of your  
SplitBrainMergePolicy. | 
String | 
toString()  | 
void | 
writeData(ObjectDataOutput out)
Writes object fields to output stream 
 | 
public static final String DEFAULT_MERGE_POLICY
public static final int DEFAULT_BATCH_SIZE
public MergePolicyConfig()
public MergePolicyConfig(String policy, int batchSize)
public MergePolicyConfig(MergePolicyConfig mergePolicyConfig)
public String getPolicy()
SplitBrainMergePolicy.public MergePolicyConfig setPolicy(String policy)
SplitBrainMergePolicy.
 
 For the out-of-the-box merge policies the simple classname
 is sufficient, e.g. PutIfAbsentMergePolicy.
 But also the fully qualified classname is fine, e.g.
 com.hazelcast.spi.merge.PutIfAbsentMergePolicy. For a
 custom merge policy the fully qualified classname is needed.
 
 Must be a non-empty string. The default
 value is PutIfAbsentMergePolicy.
policy - the classname of the merge policyMergePolicyConfig instancepublic int getBatchSize()
public MergePolicyConfig setBatchSize(int batchSize)
 Must be a positive number. Set to 1 to disable
 batching. The default value is 100.
batchSize - the batch sizeMergePolicyConfig instancepublic int getFactoryId()
IdentifiedDataSerializablegetFactoryId in interface IdentifiedDataSerializablepublic int getClassId()
IdentifiedDataSerializablegetClassId in interface IdentifiedDataSerializablepublic void writeData(ObjectDataOutput out) throws IOException
DataSerializablewriteData in interface DataSerializableout - 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
DataSerializablereadData in interface DataSerializablein - 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.