- others = request.getOthers();
- }
-
- @Override
- public void readExternal(final ObjectInput in) throws IOException, ClassNotFoundException {
- super.readExternal(in);
-
- final int size = in.readInt();
- final var builder = ImmutableList.<UnsignedLong>builderWithExpectedSize(size);
- int idx;
- if (size % 2 != 0) {
- builder.add(UnsignedLong.fromLongBits(WritableObjects.readLong(in)));
- idx = 1;
- } else {
- idx = 0;
- }
- for (; idx < size; idx += 2) {
- final byte hdr = WritableObjects.readLongHeader(in);
- builder.add(UnsignedLong.fromLongBits(WritableObjects.readFirstLong(in, hdr)));
- builder.add(UnsignedLong.fromLongBits(WritableObjects.readSecondLong(in, hdr)));
- }
- others = builder.build();
- }
-
- @Override
- public void writeExternal(final ObjectOutput out) throws IOException {
- super.writeExternal(out);
-
- final int size = others.size();
- out.writeInt(size);
-
- int idx;
- if (size % 2 != 0) {
- WritableObjects.writeLong(out, others.get(0).longValue());
- idx = 1;
- } else {
- idx = 0;
- }
- for (; idx < size; idx += 2) {
- WritableObjects.writeLongs(out, others.get(idx).longValue(), others.get(idx + 1).longValue());
- }
- }
-
- @Override
- protected SkipTransactionsRequest createRequest(final TransactionIdentifier target, final long sequence,
- final ActorRef replyToActor) {
- return new SkipTransactionsRequest(target, sequence, replyToActor, others);