Class AccumulatorFactory
java.lang.Object
com.scivicslab.pojoactor.workflow.accumulator.AccumulatorFactory
Factory for creating Accumulator instances and actors.
Usage Example
// Create just the POJO
Accumulator acc = AccumulatorFactory.create("streaming");
// Create and register an actor
AccumulatorIIAR actor = AccumulatorFactory.createActor("buffered", "myAccumulator", system);
- Since:
- 2.8.0
- Author:
- devteam@scivics-lab.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AccumulatorCreates an Accumulator instance of the specified type.static AccumulatorIIARcreateActor(String type, IIActorSystem system) Creates an AccumulatorIIAR with the default name "accumulator" and registers it.static AccumulatorIIARcreateActor(String type, String actorName, IIActorSystem system) Creates an AccumulatorIIAR and registers it with the actor system.
-
Constructor Details
-
AccumulatorFactory
public AccumulatorFactory()
-
-
Method Details
-
create
Creates an Accumulator instance of the specified type.- Parameters:
type- the accumulator type: "streaming", "buffered", "table", or "json"- Returns:
- the Accumulator instance
- Throws:
IllegalArgumentException- if the type is unknown
-
createActor
Creates an AccumulatorIIAR and registers it with the actor system.- Parameters:
type- the accumulator type: "streaming", "buffered", "table", or "json"actorName- the name for the actorsystem- the actor system to register with- Returns:
- the created AccumulatorIIAR
- Throws:
IllegalArgumentException- if the type is unknown
-
createActor
Creates an AccumulatorIIAR with the default name "accumulator" and registers it.- Parameters:
type- the accumulator type: "streaming", "buffered", "table", or "json"system- the actor system to register with- Returns:
- the created AccumulatorIIAR
- Throws:
IllegalArgumentException- if the type is unknown
-