mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Add missing synchronized keywords and assertions
applyContentMetadataMutations and getContentMetadata methods suppossed to be synchronized and assert the instance isn't released. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=191419637
This commit is contained in:
parent
82c71378eb
commit
f7e2cdbbbb
1 changed files with 5 additions and 3 deletions
|
|
@ -306,14 +306,16 @@ public final class SimpleCache implements Cache {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void applyContentMetadataMutations(String key, ContentMetadataMutations mutations)
|
public synchronized void applyContentMetadataMutations(
|
||||||
throws CacheException {
|
String key, ContentMetadataMutations mutations) throws CacheException {
|
||||||
|
Assertions.checkState(!released);
|
||||||
index.applyContentMetadataMutations(key, mutations);
|
index.applyContentMetadataMutations(key, mutations);
|
||||||
index.store();
|
index.store();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContentMetadata getContentMetadata(String key) {
|
public synchronized ContentMetadata getContentMetadata(String key) {
|
||||||
|
Assertions.checkState(!released);
|
||||||
return index.getContentMetadata(key);
|
return index.getContentMetadata(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue