Class FailOnCloseDataSink.Factory
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.FailOnCloseDataSink.Factory
-
- All Implemented Interfaces:
DataSink.Factory
- Enclosing class:
- FailOnCloseDataSink
public static final class FailOnCloseDataSink.Factory extends Object implements DataSink.Factory
Factory to create aFailOnCloseDataSink
.
-
-
Constructor Summary
Constructors Constructor Description Factory(Cache cache, AtomicBoolean failOnClose)
Creates an instance.
-
-
-
Constructor Detail
-
Factory
public Factory(Cache cache, AtomicBoolean failOnClose)
Creates an instance.- Parameters:
cache
- The cache to write to when not in fail-on-close mode.failOnClose
- AnAtomicBoolean
whose value is read in each call toDataSink.open(com.google.android.exoplayer2.upstream.DataSpec)
to determine whether to enable fail-on-close for the read that's being started.
-
-
Method Detail
-
createDataSink
public DataSink createDataSink()
Description copied from interface:DataSink.Factory
Creates aDataSink
instance.- Specified by:
createDataSink
in interfaceDataSink.Factory
-
-