Interface ProtoStreamSizeOperation

All Superinterfaces:
ProtoStreamOperation
All Known Implementing Classes:
DefaultProtoStreamSizeOperation

public interface ProtoStreamSizeOperation extends ProtoStreamOperation
A ProtoStream size operation.
Author:
Paul Ferraro
  • Method Details

    • computeSize

      <T> OptionalInt computeSize(Writable<T> operation, T value)
      Computes the size of the specified object using the specified operation.
      Type Parameters:
      T - the source object type
      Parameters:
      operation - a write operation used to compute the size
      value - the object to be sized
      Returns:
      the computed size
    • tagSize

      default int tagSize(int index, org.infinispan.protostream.descriptors.WireType type)
      Computes the marshalled size of the protobuf tag containing the specified field index and wire type.
      Parameters:
      index - a field index
      type - a wire type
      Returns:
      the marshalled size of the protobuf tag
    • varIntSize

      default int varIntSize(int value)
      Computes the marshalled size of the specified variable-width integer.
      Parameters:
      value - a variable-width integer
      Returns:
      the marshalled size of the specified variable-width integer.