MCPcopy Index your code
hub / github.com/bumptech/glide / Engine

Class Engine

library/src/main/java/com/bumptech/glide/load/engine/Engine.java:29–603  ·  view source on GitHub ↗

Responsible for starting loads and managing active and cached resources.

Source from the content-addressed store, hash-verified

27
28/** Responsible for starting loads and managing active and cached resources. */
29public class Engine
30 implements EngineJobListener,
31 MemoryCache.ResourceRemovedListener,
32 EngineResource.ResourceListener {
33 private static final String TAG = "Engine";
34 private static final int JOB_POOL_SIZE = 150;
35 private static final boolean VERBOSE_IS_LOGGABLE = Log.isLoggable(TAG, Log.VERBOSE);
36 private final Jobs jobs;
37 private final EngineKeyFactory keyFactory;
38 private final MemoryCache cache;
39 private final EngineJobFactory engineJobFactory;
40 private final ResourceRecycler resourceRecycler;
41 private final LazyDiskCacheProvider diskCacheProvider;
42 private final DecodeJobFactory decodeJobFactory;
43 private final ActiveResources activeResources;
44
45 public Engine(
46 MemoryCache memoryCache,
47 DiskCache.Factory diskCacheFactory,
48 GlideExecutor diskCacheExecutor,
49 GlideExecutor sourceExecutor,
50 GlideExecutor sourceUnlimitedExecutor,
51 GlideExecutor animationExecutor,
52 boolean isActiveResourceRetentionAllowed) {
53 this(
54 memoryCache,
55 diskCacheFactory,
56 diskCacheExecutor,
57 sourceExecutor,
58 sourceUnlimitedExecutor,
59 animationExecutor,
60 /* jobs= */ null,
61 /* keyFactory= */ null,
62 /* activeResources= */ null,
63 /* engineJobFactory= */ null,
64 /* decodeJobFactory= */ null,
65 /* resourceRecycler= */ null,
66 isActiveResourceRetentionAllowed);
67 }
68
69 @VisibleForTesting
70 Engine(
71 MemoryCache cache,
72 DiskCache.Factory diskCacheFactory,
73 GlideExecutor diskCacheExecutor,
74 GlideExecutor sourceExecutor,
75 GlideExecutor sourceUnlimitedExecutor,
76 GlideExecutor animationExecutor,
77 Jobs jobs,
78 EngineKeyFactory keyFactory,
79 ActiveResources activeResources,
80 EngineJobFactory engineJobFactory,
81 DecodeJobFactory decodeJobFactory,
82 ResourceRecycler resourceRecycler,
83 boolean isActiveResourceRetentionAllowed) {
84 this.cache = cache;
85 this.diskCacheProvider = new LazyDiskCacheProvider(diskCacheFactory);
86

Callers

nothing calls this directly

Calls 1

isLoggableMethod · 0.80

Tested by

no test coverage detected