Package org.apache.beam.sdk.transforms
Class View.AsSingleton<T>
java.lang.Object
org.apache.beam.sdk.transforms.PTransform<PCollection<T>,PCollectionView<T>>
org.apache.beam.sdk.transforms.View.AsSingleton<T>
- All Implemented Interfaces:
Serializable
,HasDisplayData
- Enclosing class:
View
@Internal
public static class View.AsSingleton<T>
extends PTransform<PCollection<T>,PCollectionView<T>>
For internal use only; no backwards-compatibility guarantees.
Public only so a PipelineRunner
may override its behavior.
See View.asSingleton()
.
- See Also:
-
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
annotations, displayData, name, resourceHints
-
Method Summary
Modifier and TypeMethodDescriptionReturns the default value of this transform, or null if there isn't one.expand
(PCollection<T> input) Override this method to specify how thisPTransform
should be expanded on the givenInputT
.boolean
Returns whether this transform has a default value.withDefaultValue
(T defaultValue) Default value to return for windows with no value in them.Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
Method Details
-
hasDefaultValue
public boolean hasDefaultValue()Returns whether this transform has a default value. -
defaultValue
Returns the default value of this transform, or null if there isn't one. -
withDefaultValue
Default value to return for windows with no value in them. -
expand
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
- Specified by:
expand
in classPTransform<PCollection<T>,
PCollectionView<T>>
-