Interface for deferred tasks. Classes implementing this interface may use TaskOptions#payload(DeferredTask) to serialize the DeferredTask into the payload of the
task definition. The DeferredTask#run() method will be called when the task is received
by the built in DeferredTask servlet.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003e\u003ccode\u003eDeferredTask\u003c/code\u003e is an interface for tasks that can be serialized into a task definition's payload using \u003ccode\u003eTaskOptions#payload(DeferredTask)\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDeferredTask#run()\u003c/code\u003e method is invoked when the task is handled by the built-in \u003ccode\u003eDeferredTask\u003c/code\u003e servlet.\u003c/p\u003e\n"],["\u003cp\u003eA successful execution of the \u003ccode\u003eDeferredTask#run()\u003c/code\u003e method is considered to have been successful unless \u003ccode\u003eDeferredTaskContext#markForRetry\u003c/code\u003e is specifically called.\u003c/p\u003e\n"],["\u003cp\u003eExceptions thrown by \u003ccode\u003eDeferredTask#run()\u003c/code\u003e are treated as a failure, initiating a retry unless \u003ccode\u003eDeferredTaskContext#setDoNotRetry(boolean)\u003c/code\u003e is true.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDeferredTask\u003c/code\u003e interface implements both \u003ccode\u003eRunnable\u003c/code\u003e and \u003ccode\u003eSerializable\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]