コード例 #1
0
  /**
   * Reads object from data input. Note we do not use externalizable interface to eliminate
   * marshaller.
   *
   * @param in Data input.
   * @throws IOException If read failed.
   */
  @Override
  public void readExternal(ObjectInput in) throws IOException {
    start = in.readLong();
    len = in.readLong();

    int size;

    if (in.readBoolean()) {
      size = in.readInt();

      nodeIds = new ArrayList<>(size);

      for (int i = 0; i < size; i++) nodeIds.add(U.readUuid(in));
    }

    size = in.readInt();

    names = new ArrayList<>(size);

    for (int i = 0; i < size; i++) names.add(in.readUTF());

    size = in.readInt();

    hosts = new ArrayList<>(size);

    for (int i = 0; i < size; i++) hosts.add(in.readUTF());
  }
コード例 #2
0
  /** {@inheritDoc} */
  @Override
  public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    nodeId = U.readUuid(in);

    nodeOrder = in.readLong();
    updateSeq = in.readLong();

    putAll(U.<UUID, GridDhtPartitionMap>readMap(in));
  }