class TxLocksRequest extends GridCacheMessage {
    /** Serial version UID. */
    private static final long serialVersionUID = 0L;

    /** Future ID. */
    private long futId;

    /** Tx keys. */
    @GridToStringInclude
    @GridDirectTransient
    private Set<IgniteTxKey> txKeys;

    /** Array of txKeys from {@link #txKeys}. Used during marshalling and unmarshalling. */
    @GridToStringExclude
    private IgniteTxKey[] txKeysArr;

    /**
     * Default constructor.
     */
    public TxLocksRequest() {
        // No-op.
    }

    /**
     * @param futId Future ID.
     * @param txKeys Target tx keys.
     */
    public TxLocksRequest(long futId, Set<IgniteTxKey> txKeys) {
        A.notEmpty(txKeys, "txKeys");

        this.futId = futId;
        this.txKeys = txKeys;
    }

    /** {@inheritDoc} */
    @Override public int handlerId() {
        return 0;
    }

    /** {@inheritDoc} */
    @Override public boolean cacheGroupMessage() {
        return false;
    }

    /**
     * @return Future ID.
     */
    public long futureId() {
        return futId;
    }

    /**
     * @return Tx keys.
     */
    public Collection<IgniteTxKey> txKeys() {
        return txKeys;
    }

    /** {@inheritDoc} */
    @Override public String toString() {
        return S.toString(TxLocksRequest.class, this);
    }

    /** {@inheritDoc} */
    @Override public boolean addDeploymentInfo() {
        return addDepInfo;
    }

    /** {@inheritDoc} */
    @Override public void prepareMarshal(GridCacheSharedContext ctx) throws IgniteCheckedException {<FILL_FUNCTION_BODY>}

    /** {@inheritDoc} */
    @Override public void finishUnmarshal(GridCacheSharedContext ctx, ClassLoader ldr) throws IgniteCheckedException {
        super.finishUnmarshal(ctx, ldr);

        txKeys = U.newHashSet(txKeysArr.length);

        for (IgniteTxKey key : txKeysArr) {
            key.finishUnmarshal(ctx.cacheContext(key.cacheId()), ldr);

            txKeys.add(key);
        }

        txKeysArr = null;
    }

    /** {@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 3:
                if (!writer.writeLong("futId", futId))
                    return false;

                writer.incrementState();

            case 4:
                if (!writer.writeObjectArray("txKeysArr", txKeysArr, MessageCollectionItemType.MSG))
                    return false;

                writer.incrementState();

        }

        return true;
    }

    /** {@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 3:
                futId = reader.readLong("futId");

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

                reader.incrementState();

            case 4:
                txKeysArr = reader.readObjectArray("txKeysArr", MessageCollectionItemType.MSG, IgniteTxKey.class);

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

                reader.incrementState();

        }

        return reader.afterMessageRead(TxLocksRequest.class);
    }

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

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

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

        super.prepareMarshal(ctx);

        txKeysArr = new IgniteTxKey[txKeys.size()];

        int i = 0;

        for (IgniteTxKey key : txKeys) {
            key.prepareMarshal(ctx.cacheContext(key.cacheId()));

            txKeysArr[i++] = key;
        }
    
<methods>public non-sealed void <init>() ,public abstract boolean addDeploymentInfo() ,public abstract boolean cacheGroupMessage() ,public org.apache.ignite.IgniteCheckedException classError() ,public org.apache.ignite.internal.managers.deployment.GridDeploymentInfo deployInfo() ,public java.lang.Throwable error() ,public byte fieldsCount() ,public void finishUnmarshal(GridCacheSharedContext#RAW, java.lang.ClassLoader) throws org.apache.ignite.IgniteCheckedException,public final void finishUnmarshalCacheObjects(List<? extends org.apache.ignite.internal.processors.cache.CacheObject>, GridCacheContext#RAW, java.lang.ClassLoader) throws org.apache.ignite.IgniteCheckedException,public abstract int handlerId() ,public boolean ignoreClassErrors() ,public org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion lastAffinityChangedTopologyVersion() ,public void lastAffinityChangedTopologyVersion(org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion) ,public int lookupIndex() ,public long messageId() ,public org.apache.ignite.IgniteLogger messageLogger(GridCacheSharedContext#RAW) ,public static int nextIndexId() ,public void onAckReceived() ,public void onClassError(org.apache.ignite.IgniteCheckedException) ,public int partition() ,public boolean partitionExchangeMessage() ,public final void prepare(org.apache.ignite.internal.managers.deployment.GridDeploymentInfo) ,public void prepareMarshal(GridCacheSharedContext#RAW) throws org.apache.ignite.IgniteCheckedException,public final void prepareMarshalCacheObjects(List<? extends org.apache.ignite.internal.processors.cache.CacheObject>, GridCacheContext#RAW) throws org.apache.ignite.IgniteCheckedException,public boolean readFrom(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageReader) ,public java.lang.String toString() ,public org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion topologyVersion() ,public boolean writeTo(java.nio.ByteBuffer, org.apache.ignite.plugin.extensions.communication.MessageWriter) <variables>public static final java.lang.String CACHE_MSG_INDEX_FIELD_NAME,public static final int MAX_CACHE_MSG_LOOKUP_INDEX,private static final long NULL_MSG_ID,protected boolean addDepInfo,private org.apache.ignite.internal.managers.deployment.GridDeploymentInfoBean depInfo,private org.apache.ignite.IgniteCheckedException err,protected boolean forceAddDepInfo,private org.apache.ignite.internal.processors.affinity.AffinityTopologyVersion lastAffChangedTopVer,private long msgId,private static final java.util.concurrent.atomic.AtomicInteger msgIdx,private static final long serialVersionUID,private boolean skipPrepare