Supervisor
Inherits from: Object
Instance variables:
strategy, childSpecs, maxRestarts, maxSeconds, process, children, restartTimes, running
Class Methods
uncategorized
class new:children:
Create a supervisor with the given strategy and child specifications. Default restart intensity: 3 restarts in 5 seconds.
class new:children:maxRestarts:maxSeconds:
Instance Methods
uncategorized
childSpecs
Return the child specs array.
countChildren
Return the count of running children.
findChildId:
findSpec:
handleChildDown:
primInit:specs:maxR:maxS:
printString
process
Return the supervisor process.
recordRestart
restartAllChildren
restartChild:
restartFrom:
restartIntensityExceeded
runLoop
runningChildren
Return the IDs of currently running children.
shouldRestart:reason:
start
Start the supervisor. Spawns a supervisor process that manages children.
startChild:
Start a new child dynamically. Adds the spec and starts the child process. Returns true if started successfully.
startOneChild:
stop
Stop the supervisor and all children.
strategy
Return the strategy symbol.
terminateAllChildren
terminateChild:
Terminate a child by ID. The child is stopped and its spec is removed.