|
Carrot2 v3.6.0-SNAPSHOT
API Documentation |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.carrot2.core.PoolingProcessingComponentManager
public class PoolingProcessingComponentManager
An IProcessingComponentManager that pools instances of processing components.
| Constructor Summary | |
|---|---|
PoolingProcessingComponentManager()
Creates a new PoolingProcessingComponentManager using the default pool
implementation SoftUnboundedPool). |
|
PoolingProcessingComponentManager(IParameterizedPool<IProcessingComponent,String> componentPool)
Creates a new PoolingProcessingComponentManager with a custom pool
implementation. |
|
| Method Summary | |
|---|---|
void |
dispose()
Called upon disposal of the controller. |
void |
init(IControllerContext context,
Map<String,Object> attributes,
ProcessingComponentConfiguration... configurations)
Called upon initialization of the Controller. |
IProcessingComponent |
prepare(Class<? extends IProcessingComponent> clazz,
String id,
Map<String,Object> inputAttributes,
Map<String,Object> outputAttributes)
Prepares a component for processing. |
void |
recycle(IProcessingComponent component,
String id)
Called after processing completed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PoolingProcessingComponentManager()
PoolingProcessingComponentManager using the default pool
implementation SoftUnboundedPool).
public PoolingProcessingComponentManager(IParameterizedPool<IProcessingComponent,String> componentPool)
PoolingProcessingComponentManager with a custom pool
implementation.
componentPool - the pool to be used by this manager| Method Detail |
|---|
public void init(IControllerContext context,
Map<String,Object> attributes,
ProcessingComponentConfiguration... configurations)
IProcessingComponentManagerController.
init in interface IProcessingComponentManagercontext - controller contextattributes - global initialization attributes provided to the controllerconfigurations - component configurations provided to the controller
public IProcessingComponent prepare(Class<? extends IProcessingComponent> clazz,
String id,
Map<String,Object> inputAttributes,
Map<String,Object> outputAttributes)
IProcessingComponentManager
prepare in interface IProcessingComponentManagerclazz - class of the component to prepareid - Identifier of the component to prepare. May be null.inputAttributes - input attributes for all components requested to perform
processing. Both Init- and Processing-time attributes
will be provided. Managers must not modify this map.outputAttributes - storage for output attributes
public void recycle(IProcessingComponent component,
String id)
IProcessingComponentManager
recycle in interface IProcessingComponentManagercomponent - Component instance returned from IProcessingComponentManager.prepare(java.lang.Class extends org.carrot2.core.IProcessingComponent>, java.lang.String, java.util.Map, java.util.Map) .id - The same identifier of the component as used in the call to
IProcessingComponentManager.prepare(java.lang.Class extends org.carrot2.core.IProcessingComponent>, java.lang.String, java.util.Map, java.util.Map) . May be null.public void dispose()
IProcessingComponentManager
dispose in interface IProcessingComponentManager
|
Please refer to project documentation at
http://project.carrot2.org |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||