Class ThriftObjectSizeUtils


  • public final class ThriftObjectSizeUtils
    extends Object
    • Method Detail

      • getApproximateSizeOfMutationMap

        public static long getApproximateSizeOfMutationMap​(Map<ByteBuffer,​Map<String,​List<org.apache.cassandra.thrift.Mutation>>> batchMutateMap)
      • getApproximateSizeOfColsByKey

        public static long getApproximateSizeOfColsByKey​(Map<ByteBuffer,​List<org.apache.cassandra.thrift.ColumnOrSuperColumn>> result)
      • getApproximateSizeOfColListsByKey

        public static long getApproximateSizeOfColListsByKey​(Map<ByteBuffer,​List<List<org.apache.cassandra.thrift.ColumnOrSuperColumn>>> result)
      • getApproximateSizeOfKeySlices

        public static long getApproximateSizeOfKeySlices​(List<org.apache.cassandra.thrift.KeySlice> slices)
      • getCasByteCount

        public static long getCasByteCount​(List<org.apache.cassandra.thrift.Column> updates)
      • getColumnOrSuperColumnSize

        public static long getColumnOrSuperColumnSize​(org.apache.cassandra.thrift.ColumnOrSuperColumn columnOrSuperColumn)
      • getByteBufferSize

        public static long getByteBufferSize​(ByteBuffer byteBuffer)
      • getMutationSize

        public static long getMutationSize​(org.apache.cassandra.thrift.Mutation mutation)
      • getCqlResultSize

        public static long getCqlResultSize​(org.apache.cassandra.thrift.CqlResult cqlResult)
      • getKeySliceSize

        public static long getKeySliceSize​(org.apache.cassandra.thrift.KeySlice keySlice)
      • getStringSize

        public static long getStringSize​(String string)
      • getColumnSize

        public static long getColumnSize​(org.apache.cassandra.thrift.Column column)
      • getCollectionSize

        public static <T> long getCollectionSize​(@Nullable
                                                 Collection<T> collection,
                                                 ToLongFunction<T> sizeFunction)