/**
  * @param obj Object to marshal.
  * @return Marshalled byte array.
  * @throws GridException If marshalling failed.
  */
 private byte[] marshal(Object obj) throws GridException {
   return CU.marshal(cctx, obj).getEntireArray();
 }
  /** {@inheritDoc} */
  @Override
  public void start0() throws GridException {
    spaceName = CU.swapSpaceName(cctx);

    swapMgr = cctx.gridSwap();
  }
  /**
   * @param key Key to read swap entry for.
   * @return Read value.
   * @throws GridException If read failed.
   */
  @Nullable
  GridCacheSwapEntry<V> readAndRemove(K key) throws GridException {
    if (!enabled) return null;

    return readAndRemove(CU.marshal(cctx, key).getEntireArray());
  }