コード例 #1
0
  /** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    GridBiTuple<GridCacheContext, String> t = stash.get();

    t.set1((GridCacheContext) in.readObject());
    t.set2(in.readUTF());
  }
コード例 #2
0
  /**
   * @param in Object input.
   * @return Read collection.
   * @throws IOException If failed.
   * @throws ClassNotFoundException If failed.
   */
  private Collection<Object> readFieldsCollection(ObjectInput in)
      throws IOException, ClassNotFoundException {
    assert fields;

    int size = in.readInt();

    if (size == -1) return null;

    Collection<Object> res = new ArrayList<>(size);

    for (int i = 0; i < size; i++) {
      int size0 = in.readInt();

      Collection<Object> col = new ArrayList<>(size0);

      for (int j = 0; j < size0; j++) col.add(in.readObject());

      assert col.size() == size0;

      res.add(col);
    }

    assert res.size() == size;

    return res;
  }
コード例 #3
0
  /** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    depEnabled = in.readBoolean();

    if (depEnabled) {
      topicBytes = U.readByteArray(in);
      predBytes = U.readByteArray(in);
      clsName = U.readString(in);
      depInfo = (GridDeploymentInfoBean) in.readObject();
    } else {
      topic = in.readObject();
      pred = (GridBiPredicate<UUID, Object>) in.readObject();
    }
  }
コード例 #4
0
  /** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    nodeId = GridUtils.readUuid(in);

    ver = CU.readVersion(in);

    timeout = in.readLong();
    threadId = in.readLong();
    id = in.readLong();

    short flags = in.readShort();

    mask(OWNER, OWNER.get(flags));
    mask(USED, USED.get(flags));
    mask(TX, TX.get(flags));

    ts = U.currentTimeMillis();
  }
コード例 #5
0
  /** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    src = U.readByteArray(in);

    depMode = GridDeploymentMode.fromOrdinal(in.readInt());

    clsLdrId = U.readGridUuid(in);
    srcClsName = U.readString(in);
    userVer = U.readString(in);
    ldrParties = U.readMap(in);
  }
コード例 #6
0
  /** {@inheritDoc} */
  @SuppressWarnings("unchecked")
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    id = in.readInt();

    String clsName = in.readUTF();

    if (clsName == null) innerSplit = in.readObject();
    else {
      // Split wrapper only used when classes available in our classpath, so Class.forName is ok
      // here.
      Class<Writable> cls = (Class<Writable>) Class.forName(clsName);

      try {
        innerSplit = U.newInstance(cls);
      } catch (GridException e) {
        throw new IOException(e);
      }

      ((Writable) innerSplit).readFields(in);
    }
  }
コード例 #7
0
 /** {@inheritDoc} */
 @Override
 public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
   key = (K) in.readObject();
   val = (V) in.readObject();
 }
コード例 #8
0
  /** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    createTime = in.readLong();
    readTime = in.readLong();
    writeTime = in.readLong();
    commitTime = in.readLong();
    rollbackTime = in.readLong();

    reads = in.readInt();
    writes = in.readInt();
    hits = in.readInt();
    misses = in.readInt();
    txCommits = in.readInt();
    txRollbacks = in.readInt();
  }