Package net.sodacan.core.actor
Class ActorGroupStats
java.lang.Object
net.sodacan.core.actor.AbstractActor
net.sodacan.core.actor.ActorGroupStats
- All Implemented Interfaces:
Closeable,AutoCloseable,Actor,HostBound
This host-bound actor displays statistics periodically. Note: A host-bound
actor has the kind of lifecycle we need for stats collection: a well-defined beginning (start) and
end (close). This actor can process other kinds of messages as well, if needed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classNested classes/interfaces inherited from interface net.sodacan.core.Actor
Actor.Builtin -
Field Summary
FieldsFields inherited from class net.sodacan.core.actor.AbstractActor
emptyStage, inbound -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidIf the periodic status in running, kill it.Default behavior for an actor is to throw an exceptionvoidshowStatus(int freqMs) voidprotected Stagestartup()Methods inherited from class net.sodacan.core.actor.AbstractActor
callProcessMessage, evictionProbability, exitingThread, getActorGroup, getActorId, getConfig, getEmptyStage, getLiveActorGroupStatistics, handleStage, nextRoute, restore, rollback, save, send, setActorGroup, validateRoute
-
Field Details
-
stats
-
-
Constructor Details
-
ActorGroupStats
-
-
Method Details
-
processMessage
Description copied from class:AbstractActorDefault behavior for an actor is to throw an exception- Specified by:
processMessagein interfaceActor- Overrides:
processMessagein classAbstractActor- Returns:
- A Stage object containing messages to be processed during Commit
-
startup
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
showSummary
public void showSummary() -
showStatus
public void showStatus(int freqMs) -
killStatus
public void killStatus()If the periodic status in running, kill it.
-