Book Image

Getting Started with Hazelcast, Second Edition

By : Matthew Johns
Book Image

Getting Started with Hazelcast, Second Edition

By: Matthew Johns

Overview of this book

Table of Contents (19 chapters)
Getting Started with Hazelcast Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

WAN replication configuration


This is used to set up remote WAN replication between clusters, either in an active-passive or an active-active deployment. The deployment code is as follows:

<wan-replication name="our-global-cluster">
 <target-cluster group-name="paris" group-password="paris-pass">
  <replication-impl>
   com.hazelcast.impl.wan.WanNoDelayReplication
  </replication-impl>
  <end-points>
   <address>12.34.56.78:5701</address>
  </end-points>
 </target-cluster>
</wan-replication>

WanTargetClusterConfig wtcc = new WanTargetClusterConfig();
wtcc.setGroupName("paris")
 .setGroupPassword("par-pass")
 .setReplicationImplObject(new WanNoDelayReplication())
 .addEndpoint("12.34.56.78:5701");
WanReplicationConfig wrc = new WanReplicationConfig();
wrc.setName("our-global-cluster")
 .addTargetClusterConfig(wtcc);
config.addWanReplicationConfig(wrc);