コード例 #1
0
  /** {@inheritDoc} */
  @Override
  public boolean readFrom(ByteBuffer buf, MessageReader reader) {
    reader.setBuffer(buf);

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

    switch (reader.state()) {
      case 0:
        deltas =
            reader.readMap(
                "deltas", MessageCollectionItemType.UUID, MessageCollectionItemType.LONG, false);

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

        reader.incrementState();

      case 1:
        snapVer = reader.readMessage("snapVer");

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

        reader.incrementState();
    }

    return reader.afterMessageRead(GridClockDeltaSnapshotMessage.class);
  }
コード例 #2
0
  /** {@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:
        ack = reader.readBoolean("ack");

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

        reader.incrementState();

      case 4:
        infos =
            reader.readMap(
                "infos", MessageCollectionItemType.INT, MessageCollectionItemType.MSG, false);

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

        reader.incrementState();

      case 5:
        last = reader.readCollection("last", MessageCollectionItemType.INT);

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

        reader.incrementState();

      case 6:
        missed = reader.readCollection("missed", MessageCollectionItemType.INT);

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

        reader.incrementState();

      case 7:
        updateSeq = reader.readLong("updateSeq");

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

        reader.incrementState();

      case 8:
        workerId = reader.readInt("workerId");

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

        reader.incrementState();
    }

    return reader.afterMessageRead(GridDhtPartitionSupplyMessage.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);
  }