/**
  * @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();
 }
  /**
   * @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());
  }