class CacheObjectImpl extends CacheObjectAdapter {
    /** */
    private static final long serialVersionUID = 0L;

    /**
     *
     */
    public CacheObjectImpl() {
        // No-op.
    }

    /**
     * @param val Value.
     * @param valBytes Value bytes.
     */
    public CacheObjectImpl(Object val, byte[] valBytes) {
        assert val != null || valBytes != null;

        this.val = val;
        this.valBytes = valBytes;
    }

    /** {@inheritDoc} */
    @Override public boolean isPlatformType() {
        return true;
    }

    /** {@inheritDoc} */
    @Override public <T> @Nullable T value(CacheObjectValueContext ctx, boolean cpy) {
        return value(ctx, cpy, null);
    }

    /** {@inheritDoc} */
    @Nullable @Override public <T> T value(CacheObjectValueContext ctx, boolean cpy, ClassLoader ldr) {
        cpy = cpy && needCopy(ctx);

        try {
            GridKernalContext kernalCtx = ctx.kernalContext();

            IgniteCacheObjectProcessor proc = ctx.kernalContext().cacheObjects();

            if (cpy) {
                if (valBytes == null) {
                    assert val != null;

                    valBytes = valueBytesFromValue(ctx);
                }

                if (ldr == null) {
                    if (val != null)
                        ldr = val.getClass().getClassLoader();
                    else if (kernalCtx.config().isPeerClassLoadingEnabled())
                        ldr = kernalCtx.cache().context().deploy().globalLoader();
                }

                return (T)proc.unmarshal(ctx, valBytes, ldr);
            }

            if (val != null)
                return (T)val;

            assert valBytes != null;

            Object val = valueFromValueBytes(ctx, kernalCtx.config().isPeerClassLoadingEnabled() ?
                kernalCtx.cache().context().deploy().globalLoader() : null);

            if (ctx.storeValue())
                this.val = val;

            return (T)val;
        }
        catch (IgniteCheckedException e) {
            throw new IgniteException("Failed to unmarshall object.", e);
        }
    }

    /** {@inheritDoc} */
    @Override public byte[] valueBytes(CacheObjectValueContext ctx) throws IgniteCheckedException {
        if (valBytes == null)
            valBytes = valueBytesFromValue(ctx);

        return valBytes;
    }

    /** {@inheritDoc} */
    @Override public void prepareMarshal(CacheObjectValueContext ctx) throws IgniteCheckedException {
        assert val != null || valBytes != null;

        if (valBytes == null)
            valBytes = valueBytesFromValue(ctx);
    }

    /** {@inheritDoc} */
    @Override public void finishUnmarshal(CacheObjectValueContext ctx, ClassLoader ldr) throws IgniteCheckedException {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public void onAckReceived() {
        // No-op.
    }

    /** {@inheritDoc} */
    @Override public short directType() {
        return 89;
    }

    /** {@inheritDoc} */
    @Override public int hashCode() {
        assert false;

        return super.hashCode();
    }

    /** {@inheritDoc} */
    @Override public boolean equals(Object obj) {
        assert false;

        return super.equals(obj);
    }

    /** {@inheritDoc} */
    @Override public CacheObject prepareForCache(CacheObjectContext ctx) {
        return this;
    }
}

        assert val != null || valBytes != null;

        if (val == null && ctx.storeValue())
            val = valueFromValueBytes(ctx, ldr);
    
<methods>public non-sealed void <init>() ,public byte cacheObjectType() ,public byte fieldsCount() ,public static int objectPutSize(int) ,public boolean putValue(java.nio.ByteBuffer) throws org.apache.ignite.IgniteCheckedException,public int putValue(long) throws org.apache.ignite.IgniteCheckedException,public static int putValue(long, byte, byte[]) ,public static int putValue(long, byte, byte[], int, int) ,public boolean putValue(java.nio.ByteBuffer, int, int) throws org.apache.ignite.IgniteCheckedException,public static boolean putValue(byte, java.nio.ByteBuffer, int, int, byte[], int) throws org.apache.ignite.IgniteCheckedException,public void readExternal(java.io.ObjectInput) throws java.io.IOException, java.lang.ClassNotFoundException,public boolean readFrom(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageReader) ,public java.lang.String toString() ,public int valueBytesLength(org.apache.ignite.internal.processors.cache.CacheObjectContext) throws org.apache.ignite.IgniteCheckedException,public void writeExternal(java.io.ObjectOutput) throws java.io.IOException,public boolean writeTo(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageWriter) <variables>protected static final int HEAD_SIZE,private static final long serialVersionUID,protected java.lang.Object val,protected byte[] valBytes