docs/doc/reference/com/google/android/exoplayer2/upstream/cache/ContentMetadataMutations.html
Package com.google.android.exoplayer2.upstream.cache
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classContentMetadataMutationsextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
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 multiple mutations on metadata value which are applied atomically. This class isn't thread safe.
Constructors | Constructor | Description |
| --- | --- |
| ContentMetadataMutations() |
Deprecated.
Constructs a DefaultMetadataMutations. |
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| Map<String,Object> | getEditedValues() |
Deprecated.
Returns a map of metadata name, value pairs to be set.
|
| List<String> | getRemovedValues() |
Deprecated.
Returns a list of names of metadata values to be removed.
|
| ContentMetadataMutations | remove(String name) |
Deprecated.
Adds a mutation to remove a metadata value.
|
| ContentMetadataMutations | set(String name, byte[] value) |
Deprecated.
Adds a mutation to set a metadata value.
|
| ContentMetadataMutations | set(String name, long value) |
Deprecated.
Adds a mutation to set a metadata value.
|
| ContentMetadataMutations | set(String name, String value) |
Deprecated.
Adds a mutation to set a metadata value.
|
| static ContentMetadataMutations | setContentLength(ContentMetadataMutations mutations, long length) |
Deprecated.
Adds a mutation to set the ContentMetadata.KEY_CONTENT_LENGTH value, or to remove any existing value if C.LENGTH_UNSET is passed.
|
| static ContentMetadataMutations | setRedirectedUri(ContentMetadataMutations mutations, Uri uri) |
Deprecated.
Adds a mutation to set the ContentMetadata.KEY_REDIRECTED_URI value, or to remove any existing entry if null is passed.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public ContentMetadataMutations()
Deprecated.
Constructs a DefaultMetadataMutations.
-
public static[ContentMetadataMutations](ContentMetadataMutations.html "class in com.google.android.exoplayer2.upstream.cache")setContentLength([ContentMetadataMutations](ContentMetadataMutations.html "class in com.google.android.exoplayer2.upstream.cache")mutations,
long length)
Deprecated.
Adds a mutation to set the ContentMetadata.KEY_CONTENT_LENGTH value, or to remove any existing value if C.LENGTH_UNSET is passed.
Parameters:mutations - The mutations to modify.length - The length value, or C.LENGTH_UNSET to remove any existing entry.Returns:The mutations instance, for convenience.
-
public static[ContentMetadataMutations](ContentMetadataMutations.html "class in com.google.android.exoplayer2.upstream.cache")setRedirectedUri([ContentMetadataMutations](ContentMetadataMutations.html "class in com.google.android.exoplayer2.upstream.cache")mutations,
@Nullable[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")uri)
Deprecated.
Adds a mutation to set the ContentMetadata.KEY_REDIRECTED_URI value, or to remove any existing entry if null is passed.
Parameters:mutations - The mutations to modify.uri - The Uri value, or null to remove any existing entry.Returns:The mutations instance, for convenience.
-
@CanIgnoreReturnValue
public[ContentMetadataMutations](ContentMetadataMutations.html "class in com.google.android.exoplayer2.upstream.cache")set([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")value)
Deprecated.
Adds a mutation to set a metadata value.
Parameters:name - The name of the metadata value.value - The value to be set.Returns:This instance, for convenience.
-
@CanIgnoreReturnValue
public[ContentMetadataMutations](ContentMetadataMutations.html "class in com.google.android.exoplayer2.upstream.cache")set([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,
long value)
Deprecated.
Adds a mutation to set a metadata value.
Parameters:name - The name of the metadata value.value - The value to be set.Returns:This instance, for convenience.
-
@CanIgnoreReturnValue
public[ContentMetadataMutations](ContentMetadataMutations.html "class in com.google.android.exoplayer2.upstream.cache")set([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name,
byte[] value)
Deprecated.
Adds a mutation to set a metadata value.
Parameters:name - The name of the metadata value.value - The value to be set.Returns:This instance, for convenience.
-
@CanIgnoreReturnValue
public[ContentMetadataMutations](ContentMetadataMutations.html "class in com.google.android.exoplayer2.upstream.cache")remove([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")name)
Deprecated.
Adds a mutation to remove a metadata value.
Parameters:name - The name of the metadata value.Returns:This instance, for convenience.
-
public[List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> getRemovedValues()
Deprecated.
Returns a list of names of metadata values to be removed.
-
public[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),[Object](https://developer.android.com/reference/java/lang/Object.html?is-external=true "class or interface in java.lang")> getEditedValues()
Deprecated.
Returns a map of metadata name, value pairs to be set. Values are copied.