Package org.apache.beam.sdk.values
Class PCollectionViews.ListViewFn2<T>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.ViewFn<Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>,java.util.List<T>>
-
- org.apache.beam.sdk.values.PCollectionViews.ListViewFn2<T>
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- PCollectionViews
@Experimental(CORE_RUNNERS_ONLY) public static class PCollectionViews.ListViewFn2<T> extends ViewFn<Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>,java.util.List<T>>
Implementation which is able to adapt a multimap materialization to aList<T>
.For internal use only.
PCollectionViews.ListViewFn
is meant to be removed in the future and replaced with this class.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ListViewFn2(PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<T>
apply(Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>> primitiveViewT)
A function to adapt a primitive view type to a desired view type.Materialization<Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>>
getMaterialization()
Gets the materialization of thisViewFn
.TypeDescriptor<java.util.List<T>>
getTypeDescriptor()
Return theTypeDescriptor
describing the output of this fn.
-
-
-
Constructor Detail
-
ListViewFn2
public ListViewFn2(PCollectionViews.TypeDescriptorSupplier<T> typeDescriptorSupplier)
-
-
Method Detail
-
getMaterialization
public Materialization<Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>> getMaterialization()
Description copied from class:ViewFn
Gets the materialization of thisViewFn
.- Specified by:
getMaterialization
in classViewFn<Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>,java.util.List<T>>
-
apply
public java.util.List<T> apply(Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>> primitiveViewT)
Description copied from class:ViewFn
A function to adapt a primitive view type to a desired view type.- Specified by:
apply
in classViewFn<Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>,java.util.List<T>>
-
getTypeDescriptor
public TypeDescriptor<java.util.List<T>> getTypeDescriptor()
Description copied from class:ViewFn
Return theTypeDescriptor
describing the output of this fn.- Specified by:
getTypeDescriptor
in classViewFn<Materializations.MultimapView<java.lang.Long,PCollectionViews.ValueOrMetadata<T,OffsetRange>>,java.util.List<T>>
-
-