T
- the specialized assembler typepublic abstract class GenericLoader<T extends Assembler> extends Object implements Loader<T>
Modifier and Type | Field and Description |
---|---|
protected AssemblerBrokerService |
ab
The Assembler Broker Service
|
Constructor and Description |
---|
GenericLoader(Class<T> assemblerClass,
IntSupplier cacheSizeSupplier)
Basic constructor for creating a loader.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
exec(PipelineData pipelineData,
String name)
Attempts to load and execute the external action that has been
set.
|
protected T |
getAssembler(Class<T> type,
String name)
Pulls out an instance of the object by name.
|
T |
getAssembler(String name)
Pulls out an instance of the object by name.
|
static String |
getBasePackage()
Gets the base package where Turbine should find its default
modules.
|
int |
getCacheSize()
Get the size of a possibly configured cache
|
static List<String> |
getPackages()
Gets the package list where Turbine should find its
modules.
|
boolean |
reload()
Returns whether or not this external action is reload itself.
|
GenericLoader<T> |
setReload(boolean reload)
Sets whether or not this external action is reload itself.
|
protected AssemblerBrokerService ab
public GenericLoader(Class<T> assemblerClass, IntSupplier cacheSizeSupplier)
assemblerClass
- Class of loaded assemblercacheSizeSupplier
- Supplier of configured cache size for this assembler Classpublic abstract void exec(PipelineData pipelineData, String name) throws Exception
pipelineData
- the Turbine requestname
- the name of the assembler moduleException
- a generic exception.public boolean reload()
public GenericLoader<T> setReload(boolean reload)
reload
- True if the action must be marked as reload.public static String getBasePackage()
public static List<String> getPackages()
public T getAssembler(String name) throws Exception
getAssembler
in interface Loader<T extends Assembler>
name
- Name of object instance.Exception
- a generic exception.protected T getAssembler(Class<T> type, String name) throws Exception
type
- Type of the assembler.name
- Name of object instance.Exception
- a generic exception.public int getCacheSize()
Loader
getCacheSize
in interface Loader<T extends Assembler>
Loader.getCacheSize()
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.