/**
   * @param keyBytes Key to remove.
   * @return {@code true} if value was actually removed, {@code false} otherwise.
   * @throws GridException If failed.
   */
  @SuppressWarnings({"unchecked"})
  @Nullable
  GridCacheSwapEntry<V> read(byte[] keyBytes) throws GridException {
    if (!enabled) return null;

    GridSwapByteArray valBytes = swapMgr.read(spaceName, new GridSwapByteArray(keyBytes));

    if (valBytes == null) return null;

    // To unmarshal swap entry itself local class loader will be enough.
    return recreateEntry((GridCacheSwapEntry<V>) unmarshal(valBytes, cctx.deploy().localLoader()));
  }