Ejemplo n.º 1
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);
  }
  /** {@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);
  }
Ejemplo n.º 3
0
  /** {@inheritDoc} */
  @Override
  public boolean readFrom(ByteBuffer buf, MessageReader reader) {
    reader.setBuffer(buf);

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

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

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

        reader.incrementState();

      case 1:
        byte evtTypeOrd;

        evtTypeOrd = reader.readByte("evtType");

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

        evtType = eventTypeFromOrdinal(evtTypeOrd);

        reader.incrementState();

      case 2:
        filteredEvts = reader.readMessage("filteredEvts");

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

        reader.incrementState();

      case 3:
        flags = reader.readByte("flags");

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

        reader.incrementState();

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

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

        reader.incrementState();

      case 5:
        newVal = reader.readMessage("newVal");

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

        reader.incrementState();

      case 6:
        oldVal = reader.readMessage("oldVal");

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

        reader.incrementState();

      case 7:
        part = reader.readInt("part");

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

        reader.incrementState();

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

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

        reader.incrementState();

      case 9:
        updateCntr = reader.readLong("updateCntr");

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

        reader.incrementState();
    }

    return reader.afterMessageRead(CacheContinuousQueryEntry.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 3:
        conflictExpireTimes = reader.readMessage("conflictExpireTimes");

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

        reader.incrementState();

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

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

        reader.incrementState();

      case 5:
        conflictVers = reader.readCollection("conflictVers", MessageCollectionItemType.MSG);

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

        reader.incrementState();

      case 6:
        entryProcessorsBytes =
            reader.readCollection("entryProcessorsBytes", MessageCollectionItemType.BYTE_ARR);

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

        reader.incrementState();

      case 7:
        expiryPlcBytes = reader.readByteArray("expiryPlcBytes");

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

        reader.incrementState();

      case 8:
        fastMap = reader.readBoolean("fastMap");

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

        reader.incrementState();

      case 9:
        filter =
            reader.readObjectArray(
                "filter", MessageCollectionItemType.MSG, CacheEntryPredicate.class);

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

        reader.incrementState();

      case 10:
        futVer = reader.readMessage("futVer");

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

        reader.incrementState();

      case 11:
        hasPrimary = reader.readBoolean("hasPrimary");

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

        reader.incrementState();

      case 12:
        invokeArgsBytes =
            reader.readObjectArray(
                "invokeArgsBytes", MessageCollectionItemType.BYTE_ARR, byte[].class);

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

        reader.incrementState();

      case 13:
        keys = reader.readCollection("keys", MessageCollectionItemType.MSG);

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

        reader.incrementState();

      case 14:
        byte opOrd;

        opOrd = reader.readByte("op");

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

        op = GridCacheOperation.fromOrdinal(opOrd);

        reader.incrementState();

      case 15:
        retval = reader.readBoolean("retval");

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

        reader.incrementState();

      case 16:
        skipStore = reader.readBoolean("skipStore");

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

        reader.incrementState();

      case 17:
        subjId = reader.readUuid("subjId");

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

        reader.incrementState();

      case 18:
        byte syncModeOrd;

        syncModeOrd = reader.readByte("syncMode");

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

        syncMode = CacheWriteSynchronizationMode.fromOrdinal(syncModeOrd);

        reader.incrementState();

      case 19:
        taskNameHash = reader.readInt("taskNameHash");

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

        reader.incrementState();

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

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

        reader.incrementState();

      case 21:
        updateVer = reader.readMessage("updateVer");

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

        reader.incrementState();

      case 22:
        vals = reader.readCollection("vals", 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;

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

    switch (reader.state()) {
      case 8:
        byte concurrencyOrd;

        concurrencyOrd = reader.readByte("concurrency");

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

        concurrency = TransactionConcurrency.fromOrdinal(concurrencyOrd);

        reader.incrementState();

      case 9:
        dhtVerKeys = reader.readCollection("dhtVerKeys", MessageCollectionItemType.MSG);

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

        reader.incrementState();

      case 10:
        dhtVerVals = reader.readCollection("dhtVerVals", MessageCollectionItemType.MSG);

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

        reader.incrementState();

      case 11:
        grpLockKeyBytes = reader.readByteArray("grpLockKeyBytes");

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

        reader.incrementState();

      case 12:
        invalidate = reader.readBoolean("invalidate");

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

        reader.incrementState();

      case 13:
        byte isolationOrd;

        isolationOrd = reader.readByte("isolation");

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

        isolation = TransactionIsolation.fromOrdinal(isolationOrd);

        reader.incrementState();

      case 14:
        onePhaseCommit = reader.readBoolean("onePhaseCommit");

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

        reader.incrementState();

      case 15:
        partLock = reader.readBoolean("partLock");

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

        reader.incrementState();

      case 16:
        byte plcOrd;

        plcOrd = reader.readByte("plc");

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

        plc = GridIoPolicy.fromOrdinal(plcOrd);

        reader.incrementState();

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

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

        reader.incrementState();

      case 18:
        sys = reader.readBoolean("sys");

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

        reader.incrementState();

      case 19:
        threadId = reader.readLong("threadId");

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

        reader.incrementState();

      case 20:
        timeout = reader.readLong("timeout");

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

        reader.incrementState();

      case 21:
        txNodesBytes = reader.readByteArray("txNodesBytes");

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

        reader.incrementState();

      case 22:
        txSize = reader.readInt("txSize");

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

        reader.incrementState();

      case 23:
        writeVer = reader.readMessage("writeVer");

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

        reader.incrementState();

      case 24:
        writes = reader.readCollection("writes", MessageCollectionItemType.MSG);

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

        reader.incrementState();
    }

    return true;
  }