Interface ProtoStreamSizeOperation
- All Superinterfaces:
ProtoStreamOperation
- All Known Implementing Classes:
DefaultProtoStreamSizeOperation
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 TypeMethodDescription<T> OptionalIntcomputeSize(org.wildfly.common.function.ExceptionBiConsumer<ProtoStreamWriter, T, IOException> operation, T value) Computes the size of the specified object using the specified operation.default inttagSize(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 intvarIntSize(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 sizevalue- 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 indextype- 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.
-