CacheElement.CacheFile file = iter.next(); if (file.isLocked.compareAndSet(false, true)) { file.remove(); // remove from the containing CacheElement deleteList.add(file); iter.remove();
CacheElement.CacheFile file = iter.next(); if (file.isLocked.compareAndSet(false, true)) { file.remove(); // remove from the containing CacheElement deleteList.add(file); iter.remove();
CacheElement.CacheFile file = iter.next(); if (file.isLocked.compareAndSet(false, true)) { file.remove(); // remove from the containing CacheElement deleteList.add(file); iter.remove();
CacheElement.CacheFile file = iter.next(); if (file.isLocked.compareAndSet(false, true)) { // lock it so it isnt used anywhere else file.remove(); // remove from the containing element deleteList.add(file); count++;
CacheElement.CacheFile file = iter.next(); if (file.isLocked.compareAndSet(false, true)) { // lock it so it isnt used anywhere else file.remove(); // remove from the containing element deleteList.add(file); count++;
CacheElement.CacheFile file = iter.next(); if (file.isLocked.compareAndSet(false, true)) { // lock it so it isnt used anywhere else file.remove(); // remove from the containing element deleteList.add(file); count++;
cacheLog.debug("FileCache " + name + ": acquire from cache " + hashKey + " " + want.ncfile.getLocation() + " was changed; discard"); if (changed) { want.remove(); files.remove(want.ncfile); want.ncfile.setFileCache(null);
cacheLog.debug("FileCache " + name + ": acquire from cache " + hashKey + " " + want.ncfile.getLocation() + " was changed; discard"); if (changed) { want.remove(); files.remove(want.ncfile); want.ncfile.setFileCache(null);
private void remove(CacheElement.CacheFile want) { want.remove(); files.remove(want.ncfile); try { want.ncfile.setFileCache(null); // unhook the caching want.ncfile.close(); } catch (IOException e) { log.error("close failed on "+want.ncfile.getLocation(), e); } want.ncfile = null; }