/** * Serializes Java object into a byte array. */ public byte[] marshal(Object obj) { return impl.marshal(obj, false); }
/** * @param obj Object. * @return Bytes. * @throws BinaryObjectException If failed. */ public byte[] marshal(@Nullable Object obj) throws BinaryObjectException { byte[] arr = binaryMarsh.marshal(obj, false); assert arr.length > 0; return arr; }
/** {@inheritDoc} */ @Override protected byte[] marshal0(@Nullable Object obj) throws IgniteCheckedException { return impl.marshal(obj, false); }
/** {@inheritDoc} */ @Override public byte[] marshal(CacheObjectValueContext ctx, Object val) throws IgniteCheckedException { if (!ctx.binaryEnabled() || binaryMarsh == null) return CU.marshal(ctx.kernalContext().cache().context(), ctx.addDeploymentInfo(), val); byte[] arr = binaryMarsh.marshal(val, false); assert arr.length > 0; return arr; }
return obj; // No need to go through marshal-unmarshal because result will be the same as initial object. byte[] arr = binaryMarsh.marshal(obj, failIfUnregistered);
/** * Serializes Java object into a byte array. */ public byte[] marshal(Object obj) { return impl.marshal(obj, false); }
/** * @param obj Object. * @return Bytes. * @throws BinaryObjectException If failed. */ public byte[] marshal(@Nullable Object obj) throws BinaryObjectException { byte[] arr = binaryMarsh.marshal(obj, false); assert arr.length > 0; return arr; }
/** {@inheritDoc} */ @Override protected byte[] marshal0(@Nullable Object obj) throws IgniteCheckedException { return impl.marshal(obj, false); }
/** {@inheritDoc} */ @Override public byte[] marshal(CacheObjectValueContext ctx, Object val) throws IgniteCheckedException { if (!ctx.binaryEnabled() || binaryMarsh == null) return super.marshal(ctx, val); byte[] arr = binaryMarsh.marshal(val, false); assert arr.length > 0; return arr; }
return obj; // No need to go through marshal-unmarshal because result will be the same as initial object. byte[] arr = binaryMarsh.marshal(obj, failIfUnregistered);