public class WanPublisherConfig extends Object implements IdentifiedDataSerializable, Versioned
DiscoveryConfig
,
AwsConfig
Constructor and Description |
---|
WanPublisherConfig() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
AwsConfig |
getAwsConfig()
Returns the
AwsConfig used by the discovery mechanism for this
WAN publisher. |
AzureConfig |
getAzureConfig()
Returns the
AzureConfig used by the discovery mechanism for this
WAN publisher. |
String |
getClassName()
Returns the name of the class implementing the WanReplicationEndpoint.
|
DiscoveryConfig |
getDiscoveryConfig()
Returns the currently defined
DiscoveryConfig used by the
discovery mechanism for this WAN publisher. |
String |
getEndpoint() |
EurekaConfig |
getEurekaConfig()
Returns the
EurekaConfig used by the discovery mechanism for this
WAN publisher. |
int |
getFactoryId()
Returns DataSerializableFactory factory ID for this class.
|
GcpConfig |
getGcpConfig()
Returns the
GcpConfig used by the discovery mechanism for this
WAN publisher. |
String |
getGroupName()
Returns the group name used as an endpoint group name for authentication
on the target endpoint.
|
int |
getId()
Returns type identifier for this class.
|
Object |
getImplementation()
Returns the implementation of the WanReplicationEndpoint.
|
WanPublisherState |
getInitialPublisherState()
Returns the initial WAN publisher state.
|
KubernetesConfig |
getKubernetesConfig()
Returns the
KubernetesConfig used by the discovery mechanism for this
WAN publisher. |
Map<String,Comparable> |
getProperties()
Returns the WAN publisher properties.
|
String |
getPublisherId()
Returns the publisher ID used for identifying the publisher in a
WanReplicationConfig . |
int |
getQueueCapacity()
Returns the capacity of the primary and backup queue for WAN replication events.
|
WANQueueFullBehavior |
getQueueFullBehavior()
Returns the configured behaviour of this WAN publisher when the WAN queue
is full.
|
WanSyncConfig |
getWanSyncConfig()
Returns the config for the WAN sync mechanism.
|
int |
hashCode() |
void |
readData(ObjectDataInput in)
Reads fields from the input stream
|
WanPublisherConfig |
setAwsConfig(AwsConfig awsConfig)
Sets the
AwsConfig used by the discovery mechanism for this
WAN publisher. |
WanPublisherConfig |
setAzureConfig(AzureConfig azureConfig)
Sets the
AzureConfig used by the discovery mechanism for this
WAN publisher. |
WanPublisherConfig |
setClassName(String className)
Sets the name of the class implementing the WanReplicationEndpoint.
|
WanPublisherConfig |
setDiscoveryConfig(DiscoveryConfig discoveryConfig)
Sets the
DiscoveryConfig used by the discovery mechanism for
this WAN publisher. |
WanPublisherConfig |
setEndpoint(String endpoint) |
WanPublisherConfig |
setEurekaConfig(EurekaConfig eurekaConfig)
Sets the
EurekaConfig used by the discovery mechanism for this
WAN publisher. |
WanPublisherConfig |
setGcpConfig(GcpConfig gcpConfig)
Sets the
GcpConfig used by the discovery mechanism for this
WAN publisher. |
WanPublisherConfig |
setGroupName(String groupName)
Sets the group name used as an endpoint group name for authentication
on the target endpoint.
|
WanPublisherConfig |
setImplementation(Object implementation)
Sets the implementation of the WanReplicationEndpoint.
|
WanPublisherConfig |
setInitialPublisherState(WanPublisherState initialPublisherState)
Sets the initial publisher state.
|
WanPublisherConfig |
setKubernetesConfig(KubernetesConfig kubernetesConfig)
Sets the
KubernetesConfig used by the discovery mechanism for this
WAN publisher. |
WanPublisherConfig |
setProperties(Map<String,Comparable> properties)
Sets the WAN publisher properties.
|
WanPublisherConfig |
setPublisherId(String publisherId)
Sets the publisher ID used for identifying the publisher in a
WanReplicationConfig . |
WanPublisherConfig |
setQueueCapacity(int queueCapacity)
Sets the capacity of the primary and backup queue for WAN replication events.
|
WanPublisherConfig |
setQueueFullBehavior(WANQueueFullBehavior queueFullBehavior)
Sets the configured behaviour of this WAN publisher when the WAN queue is
full.
|
WanPublisherConfig |
setWanSyncConfig(WanSyncConfig wanSyncConfig)
Sets the config for the WAN sync mechanism.
|
String |
toString() |
void |
writeData(ObjectDataOutput out)
Writes object fields to output stream
|
public WanSyncConfig getWanSyncConfig()
public WanPublisherConfig setWanSyncConfig(WanSyncConfig wanSyncConfig)
wanSyncConfig
- the WAN sync configpublic String getGroupName()
WanReplicationConfig
.getPublisherId()
public WanPublisherConfig setGroupName(String groupName)
WanReplicationConfig
.groupName
- the WAN endpoint group namegetPublisherId()
public String getPublisherId()
WanReplicationConfig
.
If there is no publisher ID defined (it is empty), the group name will
be used as a publisher ID.null
if no publisher ID is setgetGroupName()
public WanPublisherConfig setPublisherId(String publisherId)
WanReplicationConfig
.
If there is no publisher ID defined (it is empty), the group name will
be used as a publisher ID.publisherId
- the WAN publisher IDgetGroupName()
public int getQueueCapacity()
One hazelcast instance can have up to 2*queueCapacity
events since
we keep up to queueCapacity
primary events (events with keys for
which the instance is the owner) and queueCapacity
backup events
(events with keys for which the instance is the backup).
Events for IMap and ICache count against this limit collectively.
When the queue capacity is reached, backup events are dropped while normal
replication events behave as determined by the getQueueFullBehavior()
.
The default queue size for replication queues is .
public WanPublisherConfig setQueueCapacity(int queueCapacity)
One hazelcast instance can have up to 2*queueCapacity
events since
we keep up to queueCapacity
primary events (events with keys for
which the instance is the owner) and queueCapacity
backup events
(events with keys for which the instance is the backup).
Events for IMap and ICache count against this limit collectively.
When the queue capacity is reached, backup events are dropped while normal
replication events behave as determined by the getQueueFullBehavior()
.
The default queue size for replication queues is .
queueCapacity
- the queue capacitypublic WANQueueFullBehavior getQueueFullBehavior()
public WanPublisherConfig setQueueFullBehavior(WANQueueFullBehavior queueFullBehavior)
queueFullBehavior
- the behaviour of this publisher when the WAN queue is fullpublic WanPublisherState getInitialPublisherState()
public WanPublisherConfig setInitialPublisherState(WanPublisherState initialPublisherState)
initialPublisherState
- the statepublic Map<String,Comparable> getProperties()
public WanPublisherConfig setProperties(Map<String,Comparable> properties)
properties
- WAN publisher propertiespublic String getClassName()
WanReplicationEndpoint
.public WanPublisherConfig setClassName(String className)
WanReplicationEndpoint
.className
- the name of the class implementation for the WAN replicationpublic Object getImplementation()
WanReplicationEndpoint
.public WanPublisherConfig setImplementation(Object implementation)
WanReplicationEndpoint
.implementation
- the implementation for the WAN replicationpublic AwsConfig getAwsConfig()
AwsConfig
used by the discovery mechanism for this
WAN publisher.public WanPublisherConfig setAwsConfig(AwsConfig awsConfig)
AwsConfig
used by the discovery mechanism for this
WAN publisher.awsConfig
- the AWS discovery configurationIllegalArgumentException
- if awsConfig is nullpublic GcpConfig getGcpConfig()
GcpConfig
used by the discovery mechanism for this
WAN publisher.public WanPublisherConfig setGcpConfig(GcpConfig gcpConfig)
GcpConfig
used by the discovery mechanism for this
WAN publisher.gcpConfig
- the GCP discovery configurationIllegalArgumentException
- if gcpConfig is nullpublic AzureConfig getAzureConfig()
AzureConfig
used by the discovery mechanism for this
WAN publisher.public WanPublisherConfig setAzureConfig(AzureConfig azureConfig)
AzureConfig
used by the discovery mechanism for this
WAN publisher.azureConfig
- the Azure discovery configurationIllegalArgumentException
- if azureConfig is nullpublic KubernetesConfig getKubernetesConfig()
KubernetesConfig
used by the discovery mechanism for this
WAN publisher.public WanPublisherConfig setKubernetesConfig(KubernetesConfig kubernetesConfig)
KubernetesConfig
used by the discovery mechanism for this
WAN publisher.kubernetesConfig
- the Kubernetes discovery configurationIllegalArgumentException
- if kubernetesConfig is nullpublic EurekaConfig getEurekaConfig()
EurekaConfig
used by the discovery mechanism for this
WAN publisher.public WanPublisherConfig setEurekaConfig(EurekaConfig eurekaConfig)
EurekaConfig
used by the discovery mechanism for this
WAN publisher.eurekaConfig
- the Eureka discovery configurationIllegalArgumentException
- if eurekaConfig is nullpublic DiscoveryConfig getDiscoveryConfig()
DiscoveryConfig
used by the
discovery mechanism for this WAN publisher.public WanPublisherConfig setDiscoveryConfig(DiscoveryConfig discoveryConfig)
DiscoveryConfig
used by the discovery mechanism for
this WAN publisher.discoveryConfig
- configuration to setIllegalArgumentException
- if discoveryProvidersConfig is nullpublic String getEndpoint()
public WanPublisherConfig setEndpoint(String endpoint)
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 © 2021 Hazelcast, Inc.. All Rights Reserved.