/** * @param ctx Cache context. * @throws IgniteCheckedException If failed. */ public void prepareMarshal(GridCacheContext ctx) throws IgniteCheckedException { key.prepareMarshal(ctx.cacheObjectContext()); if (err != null && errBytes == null) { try { errBytes = U.marshal(ctx.marshaller(), err); } catch (IgniteCheckedException e) { // Try send exception even if it's unable to marshal. IgniteCheckedException exc = new IgniteCheckedException(err.getMessage()); exc.setStackTrace(err.getStackTrace()); exc.addSuppressed(e); errBytes = U.marshal(ctx.marshaller(), exc); } } assert unprepareRes == null : "marshalResult() was not called for the result: " + this; if (res != null) res.prepareMarshal(ctx.cacheObjectContext()); }
/** * @param ctx Cache context. * @throws IgniteCheckedException If failed. */ public void prepareMarshal(GridCacheContext ctx) throws IgniteCheckedException { key.prepareMarshal(ctx.cacheObjectContext()); if (err != null && errBytes == null) { try { errBytes = U.marshal(ctx.marshaller(), err); } catch (IgniteCheckedException e) { // Try send exception even if it's unable to marshal. IgniteCheckedException exc = new IgniteCheckedException(err.getMessage()); exc.setStackTrace(err.getStackTrace()); exc.addSuppressed(e); errBytes = U.marshal(ctx.marshaller(), exc); } } assert unprepareRes == null : "marshalResult() was not called for the result: " + this; if (res != null) res.prepareMarshal(ctx.cacheObjectContext()); }