public void lock(K key) {
    checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);

    final Data keyData = toData(key);
    ClientMessage request =
        MultiMapLockCodec.encodeRequest(name, keyData, ThreadUtil.getThreadId(), -1);
    invoke(request, keyData);
  }
  public void lock(K key, long leaseTime, TimeUnit timeUnit) {
    checkNotNull(key, NULL_KEY_IS_NOT_ALLOWED);
    checkPositive(leaseTime, "leaseTime should be positive");

    final Data keyData = toData(key);
    ClientMessage request =
        MultiMapLockCodec.encodeRequest(
            name, keyData, ThreadUtil.getThreadId(), getTimeInMillis(leaseTime, timeUnit));
    invoke(request, keyData);
  }