O'Reilly logo

Mastering Application Development with Force.com by Kevin J. Poorman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Queueable classes

With the recent Spring '15 release, Apex developers have a new asynchronous tool, queueable Apex classes. At first glance, queueable classes are very similar to @future annotated methods. A closer look, however, reveals their true power. There are three key differences between @future and queueable classes:

  • The method for enqueueing a job returns an ID, allowing you to monitor its progress much like a batch or scheduled job
  • Queueable jobs accept sObjects
  • Finally, and perhaps most importantly, queueable code can invoke queueable code—no more exceptions complaining about how you are trying to call the @future methods or batch methods from an @future context

Implementing the queueable interface is very similar to implementing the batchable ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required