Package org.apache.beam.runners.direct
Class DirectOptions.AvailableParallelismFactory
java.lang.Object
org.apache.beam.runners.direct.DirectOptions.AvailableParallelismFactory
- All Implemented Interfaces:
DefaultValueFactory<Integer>
- Enclosing interface:
DirectOptions
public static class DirectOptions.AvailableParallelismFactory
extends Object
implements DefaultValueFactory<Integer>
A
DefaultValueFactory that returns the result of Runtime.availableProcessors()
from the create(PipelineOptions) method. Uses Runtime.getRuntime() to obtain
the Runtime.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(PipelineOptions options) Creates a default value for a getter marked withDefault.InstanceFactory.
-
Constructor Details
-
AvailableParallelismFactory
public AvailableParallelismFactory()
-
-
Method Details
-
create
Description copied from interface:DefaultValueFactoryCreates a default value for a getter marked withDefault.InstanceFactory.- Specified by:
createin interfaceDefaultValueFactory<Integer>- Parameters:
options- The current pipeline options.- Returns:
- The default value to be used for the annotated getter.
-