Class LoggingAccumulatorIIAR

java.lang.Object
com.scivicslab.pojoactor.core.ActorRef<com.scivicslab.pojoactor.core.accumulator.Accumulator>
com.scivicslab.pojoactor.workflow.IIActorRef<com.scivicslab.pojoactor.core.accumulator.Accumulator>
com.scivicslab.actoriac.LoggingAccumulatorIIAR
All Implemented Interfaces:
com.scivicslab.pojoactor.core.CallableByActionName, AutoCloseable

public class LoggingAccumulatorIIAR extends com.scivicslab.pojoactor.workflow.IIActorRef<com.scivicslab.pojoactor.core.accumulator.Accumulator>
Accumulator actor reference that also logs to H2 database.

This class extends the standard accumulator functionality to also write logs to the H2LogStore for persistent storage. Each node's output is stored with the node ID for later querying.

Supported Actions

  • add - Adds a result and logs to database
  • getSummary - Returns formatted summary of all results
  • getCount - Returns the number of added results
  • clear - Clears all accumulated results
Since:
2.9.0
Author:
devteam@scivics-lab.com
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Logger
     
    private final DistributedLogStore
     
    private final long
     

    Fields inherited from class com.scivicslab.pojoactor.core.ActorRef

    actorName, actorSystem, object
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoggingAccumulatorIIAR(String actorName, com.scivicslab.pojoactor.core.accumulator.Accumulator object, com.scivicslab.pojoactor.workflow.IIActorSystem system, DistributedLogStore logStore, long sessionId)
    Constructs a new LoggingAccumulatorIIAR.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.scivicslab.pojoactor.core.ActionResult
    callByActionName(String actionName, String arg)
     
    private com.scivicslab.pojoactor.core.ActionResult
    Handles the add action.
    private com.scivicslab.pojoactor.core.ActionResult
    Handles the clear action.
    private com.scivicslab.pojoactor.core.ActionResult
    Handles the getCount action.
    private com.scivicslab.pojoactor.core.ActionResult
    Handles the getSummary action.

    Methods inherited from class com.scivicslab.pojoactor.core.ActorRef

    ask, ask, askNow, clearJsonState, clearPendingMessages, close, createChild, getJsonBoolean, getJsonInt, getJsonString, getJsonString, getName, getNamesOfChildren, getParentName, hasJson, hasJsonState, initLogger, isAlive, json, putJson, setParentName, system, tell, tell, tellNow

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait