Adding logic to wait until hazelcast instance to be initialized