class GridH2CacheObject extends GridH2ValueMessage {
    /** */
    private CacheObject obj;

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

    /**
     * @param v Value.
     * @throws IgniteCheckedException If failed.
     */
    public GridH2CacheObject(GridH2ValueCacheObject v) throws IgniteCheckedException {
        this.obj = v.getCacheObject();

        obj.prepareMarshal(v.valueContext());
    }

    /** {@inheritDoc} */
    @Override public Value value(GridKernalContext ctx) throws IgniteCheckedException {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public boolean readFrom(ByteBuffer buf, MessageReader reader) {
        reader.setBuffer(buf);

        if (!reader.beforeMessageRead())
            return false;

        if (!super.readFrom(buf, reader))
            return false;

        switch (reader.state()) {
            case 0:
                obj = reader.readMessage("obj");

                if (!reader.isLastRead())
                    return false;

                reader.incrementState();

        }

        return reader.afterMessageRead(GridH2CacheObject.class);
    }

    /** {@inheritDoc} */
    @Override public boolean writeTo(ByteBuffer buf, MessageWriter writer) {
        writer.setBuffer(buf);

        if (!super.writeTo(buf, writer))
            return false;

        if (!writer.isHeaderWritten()) {
            if (!writer.writeHeader(directType(), fieldsCount()))
                return false;

            writer.onHeaderWritten();
        }

        switch (writer.state()) {
            case 0:
                if (!writer.writeMessage("obj", obj))
                    return false;

                writer.incrementState();

        }

        return true;
    }

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

    /** {@inheritDoc} */
    @Override public byte fieldsCount() {
        return 1;
    }

    /** {@inheritDoc} */
    @Override public String toString() {
        return String.valueOf(obj);
    }
}

        CacheObjectValueContext valCtx = ctx.query().objectContext();

        obj.finishUnmarshal(valCtx, ctx.cache().context().deploy().globalLoader());

        return new GridH2ValueCacheObject(obj, valCtx);
    
<methods>public non-sealed void <init>() ,public void onAckReceived() ,public boolean readFrom(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageReader) ,public abstract Value value(org.apache.ignite.internal.GridKernalContext) throws org.apache.ignite.IgniteCheckedException,public boolean writeTo(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageWriter) <variables>