public void serialize(NamesQueryFilter f, DataOutputPlus out, int version) throws IOException {
   out.writeInt(f.columns.size());
   ISerializer<CellName> serializer = type.cellSerializer();
   for (CellName cName : f.columns) {
     serializer.serialize(cName, out);
   }
   out.writeBoolean(f.countCQL3Rows);
 }
    public void serialize(SliceQueryFilter f, DataOutputPlus out, int version) throws IOException {
      out.writeInt(f.slices.length);
      for (ColumnSlice slice : f.slices) type.sliceSerializer().serialize(slice, out, version);
      out.writeBoolean(f.reversed);
      int count = f.count;
      out.writeInt(count);

      out.writeInt(f.compositesToGroup);
    }
 public void serialize(EstimatedHistogram eh, DataOutputPlus out) throws IOException {
   long[] offsets = eh.getBucketOffsets();
   long[] buckets = eh.getBuckets(false);
   out.writeInt(buckets.length);
   for (int i = 0; i < buckets.length; i++) {
     out.writeLong(offsets[i == 0 ? 0 : i - 1]);
     out.writeLong(buckets[i]);
   }
 }
 public void serialize(PrepareMessage message, DataOutputPlus out, int version)
     throws IOException {
   out.writeInt(message.cfIds.size());
   for (UUID cfId : message.cfIds) UUIDSerializer.serializer.serialize(cfId, out, version);
   UUIDSerializer.serializer.serialize(message.parentRepairSession, out, version);
   out.writeInt(message.ranges.size());
   for (Range<Token> r : message.ranges) {
     MessagingService.validatePartitioner(r);
     Range.tokenSerializer.serialize(r, out, version);
   }
   out.writeBoolean(message.isIncremental);
 }
Example #5
0
    public void serialize(Batch batch, DataOutputPlus out, int version) throws IOException {
      assert batch.encodedMutations.isEmpty() : "attempted to serialize a 'remote' batch";

      UUIDSerializer.serializer.serialize(batch.id, out, version);
      out.writeLong(batch.creationTime);

      out.writeUnsignedVInt(batch.decodedMutations.size());
      for (Mutation mutation : batch.decodedMutations) {
        out.writeUnsignedVInt(Mutation.serializer.serializedSize(mutation, version));
        Mutation.serializer.serialize(mutation, out, version);
      }
    }
    public void serialize(PrepareResponse response, DataOutputPlus out, int version)
        throws IOException {
      out.writeBoolean(response.promised);
      Commit.serializer.serialize(response.inProgressCommit, out, version);

      if (version < MessagingService.VERSION_30) {
        UUIDSerializer.serializer.serialize(response.mostRecentCommit.ballot, out, version);
        PartitionUpdate.serializer.serialize(response.mostRecentCommit.update, out, version);
      } else {
        Commit.serializer.serialize(response.mostRecentCommit, out, version);
      }
    }
Example #7
0
    public void serialize(Slices slices, DataOutputPlus out, int version) throws IOException {
      int size = slices.size();
      out.writeVInt(size);

      if (size == 0) return;

      List<AbstractType<?>> types =
          slices == ALL
              ? Collections.<AbstractType<?>>emptyList()
              : ((ArrayBackedSlices) slices).comparator.subtypes();

      for (Slice slice : slices) Slice.serializer.serialize(slice, out, version, types);
    }
 public void serialize(TruncateResponse tr, DataOutputPlus out, int version) throws IOException {
   out.writeUTF(tr.keyspace);
   out.writeUTF(tr.columnFamily);
   out.writeBoolean(tr.success);
 }
Example #9
0
 public void serialize(Truncation t, DataOutputPlus out, int version) throws IOException {
   out.writeUTF(t.keyspace);
   out.writeUTF(t.columnFamily);
 }