Class LoadPathCache

java.lang.Object
com.bumptech.glide.provider.LoadPathCache

public class LoadPathCache extends Object
Maintains a cache of data, resource, and transcode classes to available LoadPaths capable of decoding with the requested types.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <Data, TResource, Transcode>
    LoadPath<Data,TResource,Transcode>
    get(Class<Data> dataClass, Class<TResource> resourceClass, Class<Transcode> transcodeClass)
    May return NO_PATHS_SIGNAL to indicate that we've previously found that there are 0 available load paths for the requested types.
    boolean
    Returns true if the given LoadPath is the signal object returned from get(Class, Class, Class) that indicates that we've previously found that there are no available paths to load the requested resources and false otherwise.
    void
    put(Class<?> dataClass, Class<?> resourceClass, Class<?> transcodeClass, LoadPath<?,?,?> loadPath)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LoadPathCache

      public LoadPathCache()
  • Method Details

    • isEmptyLoadPath

      public boolean isEmptyLoadPath(@Nullable LoadPath<?,?,?> path)
      Returns true if the given LoadPath is the signal object returned from get(Class, Class, Class) that indicates that we've previously found that there are no available paths to load the requested resources and false otherwise.
    • get

      @Nullable public <Data, TResource, Transcode> LoadPath<Data,TResource,Transcode> get(Class<Data> dataClass, Class<TResource> resourceClass, Class<Transcode> transcodeClass)
      May return NO_PATHS_SIGNAL to indicate that we've previously found that there are 0 available load paths for the requested types. Callers must check using isEmptyLoadPath(LoadPath) before using any load path returned by this method.
    • put

      public void put(Class<?> dataClass, Class<?> resourceClass, Class<?> transcodeClass, @Nullable LoadPath<?,?,?> loadPath)