Summary
In this chapter, we have looked at how we can 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 the chapter by seeing how Queueable Apex compares to both future methods and Batch Apex, including discussing the historical context behind the tool being introduced. 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 out our existing processes into a format that will work well in a queueable context and avoid governor limits.
We then saw how we define and invoke Queueable Apex classes and how to chain jobs together. Finally, we discussed some of the nuances of testing Queueable Apex...