Package guru.mikelue.jdut.operation
Class DefaultOperatorFactory
- java.lang.Object
-
- guru.mikelue.jdut.operation.DefaultOperatorFactory
-
- All Implemented Interfaces:
OperatorFactory
public class DefaultOperatorFactory extends Object implements OperatorFactory
This implementation would cache the found operator in order to improve performance for looking for corresponding operators.
As with provided
TheDataSource
, this factory would use vendor-specific implementation of operations.DataGrainOperator
retrieving by this function is not thread-safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
DefaultOperatorFactory.Builder
Used to configure this factory to support operator-inspection.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static OperatorFactory
build(DataSource newDataSource)
Builds with data source of this object.static OperatorFactory
build(DataSource newDataSource, Consumer<DefaultOperatorFactory.Builder> builderConsumer)
Builds with data source and builder of this object.protected DefaultOperatorFactory
clone()
DataGrainOperator
get(String name)
Gets operator of data grain by name.
-
-
-
Method Detail
-
build
public static OperatorFactory build(DataSource newDataSource, Consumer<DefaultOperatorFactory.Builder> builderConsumer)
Builds with data source and builder of this object.- Parameters:
newDataSource
- The data sourcebuilderConsumer
- The builder to set-up operator inspector- Returns:
- The initialized factory
-
build
public static OperatorFactory build(DataSource newDataSource)
Builds with data source of this object.- Parameters:
newDataSource
- The data source- Returns:
- The initialized factory
-
get
public DataGrainOperator get(String name)
Gets operator of data grain by name.- Specified by:
get
in interfaceOperatorFactory
- Parameters:
name
- The name of operator- Returns:
- The matched operator
-
clone
protected DefaultOperatorFactory clone()
-
-