Package org.apache.beam.sdk.options
Interface DefaultValueFactory<T>
-
- Type Parameters:
T
- The type of object this factory produces.
- All Known Implementing Classes:
ExecutorOptions.ScheduledExecutorServiceFactory
,MetricsOptions.NoOpMetricsSink
,PipelineOptions.AtomicLongFactory
,PipelineOptions.DirectRunner
,PipelineOptions.JobNameFactory
,PipelineOptions.UserAgentFactory
,ResourceHintsOptions.EmptyListDefault
,SdkHarnessOptions.DefaultMaxCacheMemoryUsageMbFactory
,TestPipelineOptions.AlwaysPassMatcherFactory
public interface DefaultValueFactory<T>
An interface used with theDefault.InstanceFactory
annotation to specify the class that will be an instance factory to produce default values for a given getter onPipelineOptions
. When a property on aPipelineOptions
is fetched, and is currently unset, the default value factory will be instantiated and invoked.Care must be taken to not produce an infinite loop when accessing other fields on the
PipelineOptions
object.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
create(PipelineOptions options)
Creates a default value for a getter marked withDefault.InstanceFactory
.
-
-
-
Method Detail
-
create
T create(PipelineOptions options)
Creates a default value for a getter marked withDefault.InstanceFactory
.- Parameters:
options
- The current pipeline options.- Returns:
- The default value to be used for the annotated getter.
-
-