@Override public <T> boolean deleteFromCache(AssetKey<T> key) { AssetCache cache = handler.getCache(key.getCacheType()); if (cache != null) { return cache.deleteFromCache(key); } else { throw new IllegalArgumentException("Key " + key + " specifies no cache."); } }
@Override public <T> void addToCache(AssetKey<T> key, T asset) { AssetCache cache = handler.getCache(key.getCacheType()); if (cache != null) { cache.addToCache(key, asset); cache.notifyNoAssetClone(); } else { throw new IllegalArgumentException("Key " + key + " specifies no cache."); } }
@Override public <T> T getFromCache(AssetKey<T> key) { AssetCache cache = handler.getCache(key.getCacheType()); if (cache != null) { T asset = cache.getFromCache(key); if (asset != null) { // Since getFromCache fills the load stack, it has to be popped cache.notifyNoAssetClone(); } return asset; } else { throw new IllegalArgumentException("Key " + key + " specifies no cache."); } }
AssetCache cache = handler.getCache(key.getCacheType()); AssetProcessor proc = handler.getProcessor(key.getProcessorType());
@Override public <T> boolean deleteFromCache(AssetKey<T> key) { AssetCache cache = handler.getCache(key.getCacheType()); if (cache != null) { return cache.deleteFromCache(key); } else { throw new IllegalArgumentException("Key " + key + " specifies no cache."); } }
@Override public <T> void addToCache(AssetKey<T> key, T asset) { AssetCache cache = handler.getCache(key.getCacheType()); if (cache != null) { cache.addToCache(key, asset); cache.notifyNoAssetClone(); } else { throw new IllegalArgumentException("Key " + key + " specifies no cache."); } }
@Override public <T> T getFromCache(AssetKey<T> key) { AssetCache cache = handler.getCache(key.getCacheType()); if (cache != null) { T asset = cache.getFromCache(key); if (asset != null) { // Since getFromCache fills the load stack, it has to be popped cache.notifyNoAssetClone(); } return asset; } else { throw new IllegalArgumentException("Key " + key + " specifies no cache."); } }
AssetCache cache = handler.getCache(key.getCacheType()); AssetProcessor proc = handler.getProcessor(key.getProcessorType());