Push Replication
Push replication asynchronously pushes changes across WAN links as soon as objects are updated. For example, a datacenter in New York City can continuously push its updates to Los Angeles, allowing the L.A. site to remain synchronized with NYC. Push replication is intended for disaster recovery, ensuring that stored objects are held at multiple geographic sites in case one of the sites becomes unavailable.
By default, the CreatePolicy defined on a cache allows GeoServer Push replication. Here is how to explicitly enable GeoServer Push replication:
Cache<String, String> store1Cache = new CacheBuilder<String, String>(store1Connection, "sample", String.class)
.geoServerPushPolicy(GeoServerPushPolicy.AllowReplication)
.build();