docs: public void lockClusterState(ClusterStateChange stateChange, Address initiator, String txnId, long leaseTime,
                                   int memberListVersion, int partitionStateVersion) {
          Preconditions.checkNotNull(stateChange);
          clusterServiceLock.lock();
          try {
              if (!node.getNodeExtension().isStartCompleted()) {
                  throw new IllegalStateException("Can not lock cluster state! Startup is not completed yet!");
              }
  
              if (node.getClusterService().getClusterJoinManager().isMastershipClaimInProgress()) {
                  throw new IllegalStateException("Can not lock cluster state! Mastership claim is in progress!");
              }
  
              if (stateChange.isOfType(Version.class)) {
                  validateNodeCompatibleWith((Version) stateChange.getNewState());
                  validateClusterVersionChange((Version) stateChange.getNewState());
              }
  
              checkMemberListVersion(memberListVersion);
              checkMigrationsAndPartitionStateVersion(stateChange, partitionStateVersion);
  
              lockOrExtendClusterState(initiator, txnId, leaseTime);
  
              try {
                  // check migration status and partition-state version again
                  // if partition state is changed then release the lock and fail.
                  checkMigrationsAndPartitionStateVersion(stateChange, partitionStateVersion);
              } catch (IllegalStateException e) {
                  stateLockRef.set(LockGuard.NOT_LOCKED);
                  throw e;
              }
          } finally {
              clusterServiceLock.unlock();
          }
      }