synchronized Magazine getMagazine() { Iterator<CacheElement> it = cache.iterator(); while (it.hasNext()) { CacheElement e = it.next(); it.remove(); e.clear(); if (!e.disposed.getAndSet(true)) { return e.magazine; } } return new Magazine(this); }
synchronized Magazine getMagazine() { Iterator<CacheElement> it = cache.iterator(); while (it.hasNext()) { CacheElement e = it.next(); it.remove(); e.clear(); if (!e.disposed.getAndSet(true)) { return e.magazine; } } return new Magazine(this); }
synchronized Magazine getMagazine() { Iterator<CacheElement> it = cache.iterator(); while (it.hasNext()) { CacheElement e = it.next(); it.remove(); e.clear(); if (!e.disposed.getAndSet(true)) { return e.magazine; } } return new Magazine(this); }
synchronized Magazine getMagazine() { Iterator<CacheElement> it = cache.iterator(); while (it.hasNext()) { CacheElement e = it.next(); it.remove(); e.clear(); if (!e.disposed.getAndSet(true)) { return e.magazine; } } return new Magazine(this); }