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

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

        reader.incrementState();

      case 1:
        fragmentRanges = reader.readCollection("fragmentRanges", MessageCollectionItemType.MSG);

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

        reader.incrementState();
    }

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

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

    switch (reader.state()) {
      case 0:
        cpSpi = reader.readString("cpSpi");

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

        reader.incrementState();

      case 1:
        key = reader.readString("key");

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

        reader.incrementState();

      case 2:
        sesId = reader.readIgniteUuid("sesId");

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

        reader.incrementState();
    }

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

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

    switch (reader.state()) {
      case 0:
        clsLdrId = reader.readIgniteUuid("clsLdrId");

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

        reader.incrementState();

      case 1:
        byte depModeOrd;

        depModeOrd = reader.readByte("depMode");

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

        depMode = DeploymentMode.fromOrdinal(depModeOrd);

        reader.incrementState();

      case 2:
        locDepOwner = reader.readBoolean("locDepOwner");

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

        reader.incrementState();

      case 3:
        participants =
            reader.readMap(
                "participants",
                MessageCollectionItemType.UUID,
                MessageCollectionItemType.IGNITE_UUID,
                false);

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

        reader.incrementState();

      case 4:
        userVer = reader.readString("userVer");

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

        reader.incrementState();
    }

    return reader.afterMessageRead(GridDeploymentInfoBean.class);
  }
  /** {@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 10:
        dhtVer = reader.readMessage("dhtVer");

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

        reader.incrementState();

      case 11:
        filterFailedKeys = reader.readCollection("filterFailedKeys", MessageCollectionItemType.MSG);

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

        reader.incrementState();

      case 12:
        futId = reader.readIgniteUuid("futId");

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

        reader.incrementState();

      case 13:
        invalidParts = reader.readCollection("invalidParts", MessageCollectionItemType.INT);

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

        reader.incrementState();

      case 14:
        miniId = reader.readIgniteUuid("miniId");

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

        reader.incrementState();

      case 15:
        ownedValKeys = reader.readCollection("ownedValKeys", MessageCollectionItemType.MSG);

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

        reader.incrementState();

      case 16:
        ownedValVals = reader.readCollection("ownedValVals", MessageCollectionItemType.MSG);

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

        reader.incrementState();

      case 17:
        pending = reader.readCollection("pending", MessageCollectionItemType.MSG);

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

        reader.incrementState();

      case 18:
        retVal = reader.readMessage("retVal");

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

        reader.incrementState();
    }

    return true;
  }