Interface ProtoStreamSizeOperation

All Superinterfaces:
ProtoStreamOperation
All Known Implementing Classes:
DefaultProtoStreamSizeOperation

public interface ProtoStreamSizeOperation extends ProtoStreamOperation
A ProtoStream size operation.
Author:
Paul Ferraro
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamOperation

    ProtoStreamOperation.Context
  • Method Summary

    Modifier and Type
    Method
    Description
    computeSize(org.wildfly.common.function.ExceptionBiConsumer<ProtoStreamWriter,T,IOException> operation, T value)
    Computes the size of the specified object using the specified operation.
    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.
    default int
    varIntSize(int value)
    Computes the marshalled size of the specified variable-width integer.

    Methods inherited from interface org.wildfly.clustering.marshalling.protostream.ProtoStreamOperation

    findMarshaller, getContext, getSerializationContext
  • Method Details

    • computeSize

      <T> OptionalInt computeSize(org.wildfly.common.function.ExceptionBiConsumer<ProtoStreamWriter,T,IOException> 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.