Atom.apex

  • Docs
  • Tutorials
Docs Menu
  • Atom
    • Compute
  • Step
    • State
    • Function
  • Monitor
    • Methods

Monitor Guide

Monitor

Atom Monitors

When the governor limits are reached is determined by monitors.

Atom.apex has the following built-in monitors.

NameDescription
AggregateQueriesMonitorAggregate query limit
CalloutsMonitorCall out limit
CpuTimeMonitorCpu time limit
DMLRowsMonitorDML rows limit
DMLStatementsMonitorDML statement limit
EmailInvocationsMonitorEmail invocation limit
FutureCallsMonitorFuture call limit
HeapSizeMonitorHeap size limit
MobilePushApexCallsMonitorMobile push apex call limit
QueriesMonitorQuery limit
QueryLocatorRowsMonitorQuery locator row limit
QueryRowsMonitorQuery row limit
QueueableJobsMonitorQueueable job limit
SoslQueriesMonitorSOSL query limit

Most of the time, you don't need to care about monitors. However, you could still provide your own monitor.

public class CustomMonitor extends Atom.DefaultMonitor {
    public CustomMonitor() {
        super('Custom limit is reached');
    }

    public override Integer getCurrentValue(Atom.State s) {
        return (Integer)s.getData('count');
    }

    public override Integer getMaxValue(Atom.State s) {
        return 1000;
    }
}

Atom.registerMonitor(new CustomMonitor());

Contribute on Github! Edit this section.