Summary
In this chapter, we looked at how to use Queueable Apex as a way of allowing us to perform long-running or chained processes efficiently. As we have seen, Queueable Apex is a hybrid of future methods and Batch Apex, allowing developers to build out solutions that can execute efficiently and chain processes together where required.
We started this chapter by learning how Queueable Apex compares to both future methods and Batch Apex, including discussing the historical context behind the tool. We then looked at specific use cases that are well suited to Queueable Apex, namely those where we may want to chain multiple items together. We also discussed how we can think about separating our existing processes into a format that will work well in a queueable context and avoid governor limits.
We then learned how to define and invoke Queueable Apex classes and how to chain jobs together. Finally, we discussed some of the nuances of testing Queueable Apex to ensure that we do...