public class ControlCounter extends SimNotifier implements UnweightedSampleCollector<java.lang.Void>
This class implements the UnweightedSampleCollector
interface, so that it
can be attached to a meter like a statistic would be attached. It then counts
how often the update(Void)
method is called. This class would
typically be used together with a MessageCountMeter
.
You can use asInstance() enforced by ReflectionConstructable
to parse
and create objects of type ControlCounter and ControlCountMeter.
Modifier and Type | Class and Description |
---|---|
protected static class |
ControlCounter.State |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BATCH_CALLS |
protected long |
batchCount |
protected long |
count |
protected int |
currentBatch |
protected long |
limit |
protected ControlCounter.State |
state |
static java.lang.String |
TRANSIENT_CALLS |
protected long |
transientCount |
endOfBatchNotifier, endOfTransientPhaseNotifier
CREATE_INSTANCE_METHOD_NAME
Constructor and Description |
---|
ControlCounter(int transientCount,
int batchCount) |
Modifier and Type | Method and Description |
---|---|
protected void |
check() |
void |
count() |
static ControlCounter |
createInstance(SimNode ownNode,
Parameters pars)
as required by
ReflectionConstructable |
void |
handleStartBatch(int batchNumber) |
void |
handleStartTransientPhase() |
void |
update(java.lang.Void value) |
deregisterSimNotifier, endOfBatch, endOfTransientPhase, handleStartSimulation, registerSimNotifier
public static final java.lang.String TRANSIENT_CALLS
public static final java.lang.String BATCH_CALLS
protected ControlCounter.State state
protected int currentBatch
protected long transientCount
protected long batchCount
protected long limit
protected long count
public static ControlCounter createInstance(SimNode ownNode, Parameters pars)
ReflectionConstructable
protected void check()
public void count()
public void update(java.lang.Void value)
update
in interface UnweightedSampleCollector<java.lang.Void>
public void handleStartBatch(int batchNumber)
handleStartBatch
in class SimNotifier
public void handleStartTransientPhase()
handleStartTransientPhase
in class SimNotifier