Class SizeEstimator<T>
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.spanner.changestreams.estimator.SizeEstimator<T>
-
- All Implemented Interfaces:
java.io.Serializable
public class SizeEstimator<T> extends java.lang.Object implements java.io.SerializableThis class is used to estimate the size in bytes of a given element. It uses the givenCoderto calculate the size of the element.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SizeEstimator(org.apache.beam.sdk.coders.Coder<T> coder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longsizeOf(T element)Estimates the size in bytes of the given element with the configuredCoder.
-
-
-
Constructor Detail
-
SizeEstimator
public SizeEstimator(org.apache.beam.sdk.coders.Coder<T> coder)
-
-
Method Detail
-
sizeOf
public long sizeOf(T element)
Estimates the size in bytes of the given element with the configuredCoder.- Parameters:
element- the element instance to be estimated- Returns:
- the estimated size in bytes of the given element
-
-