@Nullable
  public static LockToken attemptLock(@NotNull Lock lock, long time) throws InterruptedException {
    if (lock.tryLock(time, TimeUnit.MILLISECONDS)) {
      return new LockToken(lock);
    }
    else {
      return null;
    }
  }
@Nullable
  public static LockToken attemptLock(@NotNull Lock lock, long time)