Package google.registry.beam.common
Class RegistryJpaIO.Read<R,T>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<T>>
-
- google.registry.beam.common.RegistryJpaIO.Read<R,T>
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.beam.sdk.transforms.display.HasDisplayData
- Enclosing class:
- RegistryJpaIO
public abstract static class RegistryJpaIO.Read<R,T> extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<T>>
Atransform
that transactionally executes a JPACriteriaQuery
and adds the results to the BEAM pipeline. Users have the option to transform the results before sending them to the next stages.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RegistryJpaIO.Read.Builder<R,T>
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_NAME
-
Constructor Summary
Constructors Constructor Description Read()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.beam.sdk.values.PCollection<T>
expand(org.apache.beam.sdk.values.PBegin input)
RegistryJpaIO.Read<R,T>
withCoder(org.apache.beam.sdk.coders.Coder<T> coder)
RegistryJpaIO.Read<R,T>
withName(java.lang.String name)
RegistryJpaIO.Read<R,T>
withResultMapper(org.apache.beam.sdk.transforms.SerializableFunction<R,T> mapper)
RegistryJpaIO.Read<R,T>
withSnapshot(java.lang.String snapshotId)
Specifies the database snapshot to use for this query.
-
-
-
Field Detail
-
DEFAULT_NAME
public static final java.lang.String DEFAULT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
expand
public org.apache.beam.sdk.values.PCollection<T> expand(org.apache.beam.sdk.values.PBegin input)
- Specified by:
expand
in classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<T>>
-
withName
public RegistryJpaIO.Read<R,T> withName(java.lang.String name)
-
withResultMapper
public RegistryJpaIO.Read<R,T> withResultMapper(org.apache.beam.sdk.transforms.SerializableFunction<R,T> mapper)
-
withCoder
public RegistryJpaIO.Read<R,T> withCoder(org.apache.beam.sdk.coders.Coder<T> coder)
-
withSnapshot
public RegistryJpaIO.Read<R,T> withSnapshot(@Nullable java.lang.String snapshotId)
Specifies the database snapshot to use for this query.This feature is Postgresql-only. User is responsible for keeping the snapshot available until all JVM workers have started using it by calling
JpaTransactionManager.setDatabaseSnapshot(java.lang.String)
.
-
-