Class CacheSpan
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.cache.CacheSpan
-
- All Implemented Interfaces:
Comparable<CacheSpan>
@Deprecated public class CacheSpan extends Object implements Comparable<CacheSpan>
Deprecated.com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.Defines a span of data that may or may not be cached (as indicated byisCached).
-
-
Field Summary
Fields Modifier and Type Field Description FilefileDeprecated.booleanisCachedDeprecated.Whether theCacheSpanis cached.StringkeyDeprecated.The cache key that uniquely identifies the resource.longlastTouchTimestampDeprecated.The last touch timestamp, orC.TIME_UNSETifisCachedis false.longlengthDeprecated.The length of theCacheSpan, orC.LENGTH_UNSETif this is an open-ended hole.longpositionDeprecated.The position of theCacheSpanin the resource.
-
Constructor Summary
Constructors Constructor Description CacheSpan(String key, long position, long length)Deprecated.Creates a hole CacheSpan which isn't cached, has no last touch timestamp and no file associated.CacheSpan(String key, long position, long length, long lastTouchTimestamp, File file)Deprecated.Creates a CacheSpan.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcompareTo(CacheSpan another)Deprecated.booleanisHoleSpan()Deprecated.Returns whether this is a holeCacheSpan.booleanisOpenEnded()Deprecated.Returns whether this is an open-endedCacheSpan.StringtoString()Deprecated.
-
-
-
Field Detail
-
key
public final String key
Deprecated.The cache key that uniquely identifies the resource.
-
position
public final long position
Deprecated.The position of theCacheSpanin the resource.
-
length
public final long length
Deprecated.The length of theCacheSpan, orC.LENGTH_UNSETif this is an open-ended hole.
-
isCached
public final boolean isCached
Deprecated.Whether theCacheSpanis cached.
-
file
@Nullable public final File file
Deprecated.
-
lastTouchTimestamp
public final long lastTouchTimestamp
Deprecated.The last touch timestamp, orC.TIME_UNSETifisCachedis false.
-
-
Constructor Detail
-
CacheSpan
public CacheSpan(String key, long position, long length)
Deprecated.Creates a hole CacheSpan which isn't cached, has no last touch timestamp and no file associated.- Parameters:
key- The cache key that uniquely identifies the resource.position- The position of theCacheSpanin the resource.length- The length of theCacheSpan, orC.LENGTH_UNSETif this is an open-ended hole.
-
CacheSpan
public CacheSpan(String key, long position, long length, long lastTouchTimestamp, @Nullable File file)
Deprecated.Creates a CacheSpan.- Parameters:
key- The cache key that uniquely identifies the resource.position- The position of theCacheSpanin the resource.length- The length of theCacheSpan, orC.LENGTH_UNSETif this is an open-ended hole.lastTouchTimestamp- The last touch timestamp, orC.TIME_UNSETifisCachedis false.file- The file corresponding to thisCacheSpan, or null if it's a hole.
-
-
Method Detail
-
isOpenEnded
public boolean isOpenEnded()
Deprecated.Returns whether this is an open-endedCacheSpan.
-
isHoleSpan
public boolean isHoleSpan()
Deprecated.Returns whether this is a holeCacheSpan.
-
compareTo
public int compareTo(CacheSpan another)
Deprecated.- Specified by:
compareToin interfaceComparable<CacheSpan>
-
-