Package com.hazelcast.wan
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 implementHazelcastInstanceAware
if it needs a reference to the instance on which it is being run.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
doPrepublicationChecks()
Performs pre-publication checks (e.g.void
init(WanReplicationConfig wanReplicationConfig, AbstractWanPublisherConfig publisherConfig)
Initializes the publisher.void
publishReplicationEvent(WanEvent<T> eventObject)
Publish theeventObject
WAN replication event.void
publishReplicationEventBackup(WanEvent<T> eventObject)
Publish theeventObject
WAN replication event backup.default void
reset()
Resets the publisher (e.g.void
shutdown()
Closes the publisher and its internal connections and shuts down other internal states.
-
-
-
Method Detail
-
init
void init(WanReplicationConfig wanReplicationConfig, AbstractWanPublisherConfig publisherConfig)
Initializes the publisher.- Parameters:
wanReplicationConfig
-WanReplicationConfig
instancepublisherConfig
-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 beforepublishReplicationEvent(WanEvent)
andpublishReplicationEventBackup(WanEvent)
.
-
publishReplicationEvent
void publishReplicationEvent(WanEvent<T> eventObject)
Publish theeventObject
WAN replication event.- Parameters:
eventObject
- the replication event
-
-