Class WanConsumerConfig

java.lang.Object
com.hazelcast.config.WanConsumerConfig
All Implemented Interfaces:
DataSerializable, IdentifiedDataSerializable

public class WanConsumerConfig extends Object implements IdentifiedDataSerializable
Config for processing WAN events received from a target cluster. You can configure certain behaviour when processing incoming WAN events or even configure your own implementation for a WAN consumer. A custom WAN consumer allows you to define custom processing logic and is usually used in combination with a custom WAN publisher. A custom consumer is optional and you may simply omit defining it which will cause the default processing logic to be used.

NOTE: EE only

See Also:
  • Field Details

  • Constructor Details

    • WanConsumerConfig

      public WanConsumerConfig()
  • Method Details

    • getProperties

      public Map<String,Comparable> getProperties()
      Returns the properties for the custom WAN consumer.
    • setProperties

      public WanConsumerConfig setProperties(Map<String,Comparable> properties)
      Sets the properties for the custom WAN consumer. These properties are accessible when initalizing the WAN consumer.
      Parameters:
      properties - the properties for the WAN consumer
      Returns:
      this config
    • getClassName

      public String getClassName()
      Returns the fully qualified class name of the class implementing WanConsumer.
      Returns:
      fully qualified class name
    • setClassName

      public WanConsumerConfig setClassName(@Nonnull String className)
      Sets the fully qualified class name of the class implementing WanConsumer. The class name may be null in which case the implementation or the default processing logic for incoming WAN events will be used.
      Parameters:
      className - fully qualified class name
      Returns:
      this config
      See Also:
    • getImplementation

      public WanConsumer getImplementation()
      Returns the implementation implementing WanConsumer.
      Returns:
      the implementation for this WAN consumer
    • setImplementation

      public WanConsumerConfig setImplementation(@Nonnull WanConsumer implementation)
      Sets the implementation for this WAN consumer. The object must implement WanConsumer. The implementation may be null in which case the class name or the default processing logic for incoming WAN events will be used.
      Parameters:
      implementation - the object implementing WanConsumer
      Returns:
      this config
      See Also:
    • isPersistWanReplicatedData

      public boolean isPersistWanReplicatedData()
      Returns:
      true when persistence of replicated data into backing store is enabled, otherwise returns false. By default this method returns false.
    • setPersistWanReplicatedData

      public WanConsumerConfig setPersistWanReplicatedData(boolean persistWanReplicatedData)
      Parameters:
      persistWanReplicatedData - set true to enable persistence of replicated data into backing store, otherwise set false to disable it. Default value is false.
      Returns:
      reference to this WanReplicationRef object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getFactoryId

      public int getFactoryId()
      Description copied from interface: IdentifiedDataSerializable
      Returns DataSerializableFactory factory ID for this class.
      Specified by:
      getFactoryId in interface IdentifiedDataSerializable
      Returns:
      factory ID
    • getClassId

      public int getClassId()
      Description copied from interface: IdentifiedDataSerializable
      Returns type identifier for this class. It should be unique per DataSerializableFactory.
      Specified by:
      getClassId in interface IdentifiedDataSerializable
      Returns:
      type ID
    • writeData

      public void writeData(ObjectDataOutput out) throws IOException
      Description copied from interface: DataSerializable
      Writes object fields to output stream
      Specified by:
      writeData in interface DataSerializable
      Parameters:
      out - output
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the output stream has been closed.
    • readData

      public void readData(ObjectDataInput in) throws IOException
      Description copied from interface: DataSerializable
      Reads fields from the input stream
      Specified by:
      readData in interface DataSerializable
      Parameters:
      in - input
      Throws:
      IOException - if an I/O error occurs. In particular, an IOException may be thrown if the input stream has been closed.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object