コード例 #1
0
 /**
  * @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();
 }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  public void start0() throws GridException {
    spaceName = CU.swapSpaceName(cctx);

    swapMgr = cctx.gridSwap();
  }
コード例 #3
0
  /**
   * @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());
  }