Package com.theoplayer.android.api.cache
Interface Cache
-
- All Implemented Interfaces:
-
com.theoplayer.android.api.event.EventDispatcher
public interface Cache implements EventDispatcher<E>
The media caching API.
- Since:
v2.39.0
-
-
Method Summary
Modifier and Type Method Description abstract CacheStatusgetStatus()The current status of the cache. abstract CachingTaskListgetTasks()List of caching tasks which control the caching of media. abstract CachingTaskcreateTask(@NonNull() SourceDescription source, @Nullable() CachingParameters parameters)Creates a caching task which controls the caching of the media. abstract voidsetNotificationBuilder(@NonNull() CacheNotificationsBuilder builder)Sets the CacheNotificationsBuilder to be used for constructing cache notifications and notification channel. abstract CacheNotificationsBuildergetNotificationBuilder()Retrieves the current CacheNotificationsBuilder instance used for constructing cache notifications. abstract NetworkgetNetwork()The Network API that manages the caching. -
-
Method Detail
-
getStatus
@NonNull() abstract CacheStatus getStatus()
- Returns:
The cache status. (NonNull)
-
getTasks
@NonNull() abstract CachingTaskList getTasks()
List of caching tasks which control the caching of media.
- To remove a task from the list, invoke remove.
- Returns:
List of caching tasks. (NonNull)
-
createTask
abstract CachingTask createTask(@NonNull() SourceDescription source, @Nullable() CachingParameters parameters)
Creates a caching task which controls the caching of the media.
- Parameters:
source- Describes the media source to be cached.parameters- Contains caching task related options.
-
setNotificationBuilder
abstract void setNotificationBuilder(@NonNull() CacheNotificationsBuilder builder)
Sets the CacheNotificationsBuilder to be used for constructing cache notifications and notification channel.
- Parameters:
builder- The CacheNotificationsBuilder instance to be set.
-
getNotificationBuilder
@NonNull() abstract CacheNotificationsBuilder getNotificationBuilder()
Retrieves the current CacheNotificationsBuilder instance used for constructing cache notifications.
- Returns:
The current CacheNotificationsBuilder instance.
-
getNetwork
@NonNull() abstract Network getNetwork()
The Network API that manages the caching.
- Returns:
The Network API. (NonNull)
-
-
-
-