• 1Installation
  • 2Preliminary Knowledge
  • 3Big Picture
  • 4Compute
  • 5Step
  • 6State
  • 7Interruptions
  • 8Functional Support
  • 9Monitor

Atom.apex

  • Docs
  • Tutorials
Getting started with Atom.apex

Monitor

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());