Atom.apex

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

State Guide

State

State

An Atom holds a state, which is then shared by all of its steps. You can access data with the state.

public class CustomCompute extends Atom.Compute {
    public override void execute(Atom.State s) {
        Integer count = (Integer)s.getData('count');
        count += 1;
        s.setData('count', count);
    }
}

Reference

MethodDescription
Map all()Get all the data
Object getData(String)Get the data by the key
void setData(String, Object)Set the data by the key and value
Boolean isInterrupted()Check if it is interrupted
void setInterrupted(Boolean)Set whether it is interrupted
Integer getInterruptedTimes()Get the interrupted times

Contribute on Github! Edit this section.