Rename Cache getContentMetadataSnapshot to getContentMetadata
And in ContentMetadata javadoc emphasize that it's a snapshot. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=190461436
This commit is contained in:
parent
eb84b144bf
commit
2a85e792f8
@ -257,10 +257,10 @@ public interface Cache {
|
||||
throws CacheException;
|
||||
|
||||
/**
|
||||
* Returns a snapshot of the {@link ContentMetadata} for the given key.
|
||||
* Returns a {@link ContentMetadata} for the given key.
|
||||
*
|
||||
* @param key The cache key for the data.
|
||||
* @return A snapshot of the {@link ContentMetadata} for the given key.
|
||||
* @return A {@link ContentMetadata} for the given key.
|
||||
*/
|
||||
ContentMetadata getContentMetadataSnapshot(String key);
|
||||
ContentMetadata getContentMetadata(String key);
|
||||
}
|
||||
|
@ -227,8 +227,8 @@ import javax.crypto.spec.SecretKeySpec;
|
||||
cachedContent.applyMetadataMutations(mutations);
|
||||
}
|
||||
|
||||
/** Returns a snapshot of the {@link ContentMetadata} for the given key. */
|
||||
public ContentMetadata getContentMetadataSnapshot(String key) {
|
||||
/** Returns a {@link ContentMetadata} for the given key. */
|
||||
public ContentMetadata getContentMetadata(String key) {
|
||||
CachedContent cachedContent = get(key);
|
||||
return cachedContent != null ? cachedContent.getMetadata() : DefaultContentMetadata.EMPTY;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.google.android.exoplayer2.upstream.cache;
|
||||
|
||||
/** Interface for accessing cached content metadata which is stored as name, value pairs. */
|
||||
/** Interface for an immutable snapshot of keyed metadata. */
|
||||
public interface ContentMetadata {
|
||||
|
||||
/**
|
||||
|
@ -466,7 +466,7 @@ public final class SimpleCache implements Cache {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ContentMetadata getContentMetadataSnapshot(String key) {
|
||||
return index.getContentMetadataSnapshot(key);
|
||||
public ContentMetadata getContentMetadata(String key) {
|
||||
return index.getContentMetadata(key);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user