public long serializedSize(SliceQueryFilter f, int version) { TypeSizes sizes = TypeSizes.NATIVE; int size = 0; size += sizes.sizeof(f.slices.length); for (ColumnSlice slice : f.slices) size += type.sliceSerializer().serializedSize(slice, version); size += sizes.sizeof(f.reversed); size += sizes.sizeof(f.count); size += sizes.sizeof(f.compositesToGroup); return size; }
public long serializedSize(Slices slices, int version) { long size = TypeSizes.sizeofVInt(slices.size()); if (slices.size() == 0) return size; List<AbstractType<?>> types = slices instanceof SelectAllSlices ? Collections.<AbstractType<?>>emptyList() : ((ArrayBackedSlices) slices).comparator.subtypes(); for (Slice slice : slices) size += Slice.serializer.serializedSize(slice, version, types); return size; }
public long serializedSize(ByteBuffer bb, TypeSizes typeSizes) { int bbSize = bb.remaining(); return typeSizes.sizeof((short) bbSize) + bbSize; }