Interface WanPublisher<T>

Type Parameters:
T - type of event data that the publisher will publish

public interface WanPublisher<T>
This interface offers the implementation of different kinds of replication techniques like TCP, UDP or maybe even an JMS based service. Implementations of this interface represent a replication target, normally another Hazelcast cluster only reachable over a Wide Area Network (WAN). The publisher may implement HazelcastInstanceAware if it needs a reference to the instance on which it is being run.
  • Method Details

    • init

      void init​(WanReplicationConfig wanReplicationConfig, AbstractWanPublisherConfig publisherConfig)
      Initializes the publisher.
      Parameters:
      wanReplicationConfig - WanReplicationConfig instance
      publisherConfig - AbstractWanPublisherConfig instance
    • shutdown

      void shutdown()
      Closes the publisher and its internal connections and shuts down other internal states. Signals the publisher to shut down and clean up its resources. The method does not necessarily block until the publisher has shut down.
    • reset

      default void reset()
      Resets the publisher (e.g. before split-brain merge).
    • doPrepublicationChecks

      void doPrepublicationChecks()
      Performs pre-publication checks (e.g. enforcing invariants). Invoked before publishReplicationEvent(WanEvent) and publishReplicationEventBackup(WanEvent).
    • publishReplicationEvent

      void publishReplicationEvent​(WanEvent<T> eventObject)
      Publish the eventObject WAN replication event.
      Parameters:
      eventObject - the replication event
    • publishReplicationEventBackup

      void publishReplicationEventBackup​(WanEvent<T> eventObject)
      Publish the eventObject WAN replication event backup.
      Parameters:
      eventObject - the replication backup event