private Resource<?> decode() throws Exception {
        if (isDecodingFromCache()) {
            return decodeFromCache();
        } else {
            return decodeFromSource();
        }
    }
A runnable class responsible for using an {@link DecodeJob} to decode resources on a
background thread in two stages.

<p>
    In the first stage, this class attempts to decode a resource
    from cache, first using transformed data and then using source data. If no resource can be decoded from cache,
    this class then requests to be posted again. During the second stage this class then attempts to use the
    {@link DecodeJob} to decode data directly from the original source.
</p>

<p>
    Using two stages with a re-post in between allows us to run fast disk cache decodes on one thread and slow source
    fetches on a second pool so that loads for local data are never blocked waiting for loads for remote data to
    complete.
</p>
core/src/main/java/com/bumptech/glide/load/engine/EngineRunnable.java