Class MapperFactory
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.spanner.changestreams.mapper.MapperFactory
-
- All Implemented Interfaces:
java.io.Serializable
public class MapperFactory extends java.lang.Object implements java.io.SerializableFactory class for creating instances that will map a struct to a connector model. The instances created are all singletons.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MapperFactory(com.google.cloud.spanner.Dialect spannerChangeStreamDatabaseDialect)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChangeStreamRecordMapperchangeStreamRecordMapper()Creates and returns a singleton instance of a mapper class capable of transforming aStructinto aListofChangeStreamRecordsubclasses.PartitionMetadataMapperpartitionMetadataMapper()Creates and returns a single instance of a mapper class capable of transforming aStructinto aPartitionMetadataclass.
-
-
-
Method Detail
-
changeStreamRecordMapper
public ChangeStreamRecordMapper changeStreamRecordMapper()
Creates and returns a singleton instance of a mapper class capable of transforming aStructinto aListofChangeStreamRecordsubclasses.This method is thread safe.
- Returns:
- singleton instance of the
ChangeStreamRecordMapper
-
partitionMetadataMapper
public PartitionMetadataMapper partitionMetadataMapper()
Creates and returns a single instance of a mapper class capable of transforming aStructinto aPartitionMetadataclass.This method is thread safe.
- Returns:
- singleton instance of the
PartitionMetadataMapper
-
-