Package com.hazelcast.config
Class AbstractWanPublisherConfig
- java.lang.Object
-
- com.hazelcast.config.AbstractWanPublisherConfig
-
- All Implemented Interfaces:
DataSerializable
,IdentifiedDataSerializable
- Direct Known Subclasses:
WanBatchPublisherConfig
,WanCustomPublisherConfig
public abstract class AbstractWanPublisherConfig extends java.lang.Object implements IdentifiedDataSerializable
Base class for WAN publisher configuration.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
className
protected WanPublisher
implementation
protected java.util.Map<java.lang.String,java.lang.Comparable>
properties
protected java.lang.String
publisherId
-
Constructor Summary
Constructors Constructor Description AbstractWanPublisherConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getClassName()
Returns the name of the class implementingWanPublisher
.WanPublisher
getImplementation()
Returns the implementation ofWanPublisher
.java.util.Map<java.lang.String,java.lang.Comparable>
getProperties()
Returns the WAN publisher properties.java.lang.String
getPublisherId()
Returns the publisher ID used for identifying the publisher in aWanReplicationConfig
.int
hashCode()
void
readData(ObjectDataInput in)
Reads fields from the input streamAbstractWanPublisherConfig
setClassName(java.lang.String className)
Sets the name of the class implementingWanPublisher
.AbstractWanPublisherConfig
setImplementation(WanPublisher implementation)
Sets the implementation ofWanPublisher
.AbstractWanPublisherConfig
setProperties(java.util.Map<java.lang.String,java.lang.Comparable> properties)
Sets the WAN publisher properties.AbstractWanPublisherConfig
setPublisherId(java.lang.String publisherId)
Sets the publisher ID used for identifying the publisher in aWanReplicationConfig
.void
writeData(ObjectDataOutput out)
Writes object fields to output stream-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.hazelcast.nio.serialization.IdentifiedDataSerializable
getClassId, getFactoryId
-
-
-
-
Field Detail
-
publisherId
protected java.lang.String publisherId
-
className
protected java.lang.String className
-
implementation
protected WanPublisher implementation
-
properties
protected java.util.Map<java.lang.String,java.lang.Comparable> properties
-
-
Method Detail
-
getPublisherId
public java.lang.String getPublisherId()
Returns the publisher ID used for identifying the publisher in aWanReplicationConfig
.- Returns:
- the WAN publisher ID or
null
if no publisher ID is set
-
setPublisherId
public AbstractWanPublisherConfig setPublisherId(java.lang.String publisherId)
Sets the publisher ID used for identifying the publisher in aWanReplicationConfig
.- Parameters:
publisherId
- the WAN publisher ID- Returns:
- this config
-
getProperties
@Nonnull public java.util.Map<java.lang.String,java.lang.Comparable> getProperties()
Returns the WAN publisher properties.
-
setProperties
public AbstractWanPublisherConfig setProperties(@Nonnull java.util.Map<java.lang.String,java.lang.Comparable> properties)
Sets the WAN publisher properties.- Parameters:
properties
- WAN publisher properties- Returns:
- this config
-
getClassName
public java.lang.String getClassName()
Returns the name of the class implementingWanPublisher
.
-
setClassName
public AbstractWanPublisherConfig setClassName(@Nonnull java.lang.String className)
Sets the name of the class implementingWanPublisher
. To configure the built in WanBatchReplication, please useWanBatchPublisherConfig
config class.- Parameters:
className
- the name of the class implementation for the WAN replication- Returns:
- this config
-
getImplementation
public WanPublisher getImplementation()
Returns the implementation ofWanPublisher
.
-
setImplementation
public AbstractWanPublisherConfig setImplementation(@Nonnull WanPublisher implementation)
Sets the implementation ofWanPublisher
.- Parameters:
implementation
- the implementation for the WAN replication- Returns:
- this config
-
writeData
public void writeData(ObjectDataOutput out) throws java.io.IOException
Description copied from interface:DataSerializable
Writes object fields to output stream- Specified by:
writeData
in interfaceDataSerializable
- Parameters:
out
- output- Throws:
java.io.IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the output stream has been closed.
-
readData
public void readData(ObjectDataInput in) throws java.io.IOException
Description copied from interface:DataSerializable
Reads fields from the input stream- Specified by:
readData
in interfaceDataSerializable
- Parameters:
in
- input- Throws:
java.io.IOException
- if an I/O error occurs. In particular, anIOException
may be thrown if the input stream has been closed.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-