@Override
    public void recycle() {
        if (acquired > 0) {
            throw new IllegalStateException("Cannot recycle a resource while it is still acquired");
        }
        if (isRecycled) {
            throw new IllegalStateException("Cannot recycle a resource that has already been recycled");
        }
        isRecycled = true;
        resource.recycle();
    }
A wrapper resource that allows reference counting a wrapped {@link Resource}
interface.

@param <Z> The type of data returned by the wrapped {@link Resource}.
core/src/main/java/com/bumptech/glide/load/engine/EngineResource.java