public ClusterListener createClusterListener ( boolean localOnly ) { if ( localOnly ) return new NoClusterListener ( ) ; HazelcastInstance hazelcast = getHazelcastInstance ( vertx ) ; if ( hazelcast != null ) { return new HazelcastClusterListener ( hazelcast , vertx ) ; } else { return new NoClusterListener ( ) ; } }
Creates a cluster listener .