class MultiRedisLock implements Lock {

  @Override
  public String acquire(final List<String> keys, final String storeId, final long expiration) {
    final var keysWithStoreIdPrefix = keys.stream().map(key -> storeId + ":" + key).collect(Collectors.toList());
    final var token = tokenSupplier.get();

    if (StringUtils.isEmpty(token)) {
      throw new IllegalStateException("Cannot lock with empty token");
    }

    final var locked = stringRedisTemplate.execute(lockScript, keysWithStoreIdPrefix, token, String.valueOf(expiration));
    log.debug("Tried to acquire lock for keys {} in store {} with token {}. Locked: {}", keys, storeId, token, locked);
    return locked ? token : null;
  }

  public  MultiRedisLock(final StringRedisTemplate stringRedisTemplate);

}