docs: private void handleClusterEvent(ClusterMembershipEvent event) {
      PrimaryTerm term = this.term;
      if (term != null && event.type() == ClusterMembershipEvent.Type.MEMBER_REMOVED && event.subject().id().equals(term.primary().memberId())) {
        threadContext.execute(() -> {
          state = PrimitiveState.SUSPENDED;
          stateChangeListeners.forEach(l -> l.accept(state));
        });
      }
    }