コード例 #1
0
  /** {@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;
  }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  public boolean readFrom(ByteBuffer buf, MessageReader reader) {
    reader.setBuffer(buf);

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

    switch (reader.state()) {
      case 0:
        pageSize = reader.readInt("pageSize");

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

        reader.incrementState();

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

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

        reader.incrementState();

      case 2:
        reqId = reader.readLong("reqId");

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

        reader.incrementState();

      case 3:
        space = reader.readString("space");

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

        reader.incrementState();

      case 4:
        topVer = reader.readMessage("topVer");

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

        reader.incrementState();

      case 5:
        extraSpaces = reader.readCollection("extraSpaces", MessageCollectionItemType.STRING);

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

        reader.incrementState();

      case 6:
        parts = reader.readIntArray("parts");

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

        reader.incrementState();
    }

    return reader.afterMessageRead(GridQueryRequest.class);
  }
コード例 #3
0
  /** {@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);
  }