@Override
    public void memberRemoved(final MembershipEvent membershipEvent) {
        final String removedMemberId = membershipEvent.getMember().getUuid();

        logger.info("Found there is one node removed from this cluster: {}", removedMemberId);

        final Optional<NodeRecord> masterNode = this.hazelcastHelper.getMasterNodeRecord();
        if (!masterNode.isPresent() || StringUtils.equals(removedMemberId, masterNode.get().getMemberId())) {
            logger.info("The removed node is a master node. Trying to become the master node.");
            this.hazelcastHelper.setMaster(this);
        } else {
            logger.info("The current master node: {}", masterNode.get());
        }
    }