Package com.google.android.exoplayer2.upstream.cache

## Class CacheDataSourceFactory

- java.lang.Object
- - com.google.android.exoplayer2.upstream.cache.CacheDataSourceFactory

- All Implemented Interfaces:
    `DataSource.Factory`

      @Deprecated
      public final class CacheDataSourceFactory
      extends Object
      implements DataSource.Factory

  Deprecated.
  Use `CacheDataSource.Factory`.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `CacheDataSourceFactory​(Cache cache, DataSource.Factory upstreamFactory)` | Deprecated. Constructs a factory which creates `CacheDataSource` instances with default `DataSource` and `DataSink` instances for reading and writing the cache.
    `CacheDataSourceFactory​(Cache cache, DataSource.Factory upstreamFactory, int flags)` | Deprecated.
    `CacheDataSourceFactory​(Cache cache, DataSource.Factory upstreamFactory, DataSource.Factory cacheReadDataSourceFactory, DataSink.Factory cacheWriteDataSinkFactory, int flags, CacheDataSource.EventListener eventListener)` | Deprecated.
    `CacheDataSourceFactory​(Cache cache, DataSource.Factory upstreamFactory, DataSource.Factory cacheReadDataSourceFactory, DataSink.Factory cacheWriteDataSinkFactory, int flags, CacheDataSource.EventListener eventListener, CacheKeyFactory cacheKeyFactory)` | Deprecated.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `CacheDataSource` | `createDataSource()` | Deprecated. Creates a `DataSource` instance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CacheDataSourceFactory

          public CacheDataSourceFactory​(Cache cache,
                                        DataSource.Factory upstreamFactory)

      Deprecated.
      Constructs a factory which creates `CacheDataSource` instances with default `DataSource` and `DataSink` instances for reading and writing the cache.
      Parameters:
        `cache` - The cache.
        `upstreamFactory` - A `DataSource.Factory` for creating upstream `DataSource`s for reading data not in the cache.

    - #### CacheDataSourceFactory

          public CacheDataSourceFactory​(Cache cache,
                                        DataSource.Factory upstreamFactory,
                                        @Flags
                                        int flags)

      Deprecated.
      See Also:
        `CacheDataSource(Cache, DataSource, int)`

    - #### CacheDataSourceFactory

          public CacheDataSourceFactory​(Cache cache,
                                        DataSource.Factory upstreamFactory,
                                        DataSource.Factory cacheReadDataSourceFactory,
                                        @Nullable
                                        DataSink.Factory cacheWriteDataSinkFactory,
                                        @Flags
                                        int flags,
                                        @Nullable
                                        CacheDataSource.EventListener eventListener)

      Deprecated.
      See Also:
        `CacheDataSource(Cache, DataSource, DataSource, DataSink, int, CacheDataSource.EventListener)`

    - #### CacheDataSourceFactory

          public CacheDataSourceFactory​(Cache cache,
                                        DataSource.Factory upstreamFactory,
                                        DataSource.Factory cacheReadDataSourceFactory,
                                        @Nullable
                                        DataSink.Factory cacheWriteDataSinkFactory,
                                        @Flags
                                        int flags,
                                        @Nullable
                                        CacheDataSource.EventListener eventListener,
                                        @Nullable
                                        CacheKeyFactory cacheKeyFactory)

      Deprecated.
      See Also:
        `CacheDataSource(Cache, DataSource, DataSource, DataSink, int, CacheDataSource.EventListener, CacheKeyFactory)`

  - ### Method Detail

    - #### createDataSource

          public CacheDataSource createDataSource()

      Deprecated.
      Description copied from interface: `DataSource.Factory`
      Creates a `DataSource` instance.
      Specified by:
        `createDataSource` in interface `DataSource.Factory`