/** {@inheritDoc} */
  @Override
  protected SoftLock lock(Object key) throws CacheException {
    try {
      TxContext ctx = txCtx.get();

      if (ctx == null) txCtx.set(ctx = new TxContext());

      lockKey(key);

      ctx.locked(key);

      return null;
    } catch (GridException e) {
      rollbackCurrentTx();

      throw new CacheException(e);
    }
  }