Interface ProtoStreamSizeOperation

    • Method Detail

      • 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:
        index - a variable-width integer
        Returns:
        the marshalled size of the specified variable-width integer.