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 enum
static class
Nested 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 TypeMethodDescriptionvoid
close()
void
If the periodic status in running, kill it.Default behavior for an actor is to throw an exceptionvoid
showStatus
(int freqMs) void
protected Stage
startup()
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:AbstractActor
Default behavior for an actor is to throw an exception- Specified by:
processMessage
in interfaceActor
- Overrides:
processMessage
in classAbstractActor
- Returns:
- A Stage object containing messages to be processed during Commit
-
startup
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
showSummary
public void showSummary() -
showStatus
public void showStatus(int freqMs) -
killStatus
public void killStatus()If the periodic status in running, kill it.
-