int bucket = -1; boolean unloadable;
int bucket = -1;
	protected Cacheable removeOne(Cacheable item) {		Collection old;		Lock lock;		double rd = 0, minRd = -1;		int bucket = -1;		boolean unloadable;		for (int i = 0; i < items.length; i++) {			old = (Collection)items[i];			if (old == null) {				bucket = i;				break;			} else {				lock = old.getLock(); 					// calculate the reference density					rd =						old.getReferenceCount()							/ (double)(totalReferences - old.getTimestamp());					// attempt to acquire a read lock on the collection.					// the collection is not considered for removal if the lock 					// cannot be acquired immediately.					if(lock.attempt(Lock.READ_LOCK)) {						if ((minRd < 0 || rd < minRd) && old.allowUnload()) {							minRd = rd;							bucket = i;						}						lock.release();					}			}		}		old = (Collection)items[bucket];		if (old != null) {			pool.getConfigurationManager().invalidate(old.getName());			map.remove(old.getKey());			names.remove(old.getName());			old.sync(true);		}		items[bucket] = item;		map.put(item.getKey(), item);                accounting.replacedPage(item);        if (cacheManager != null && accounting.resizeNeeded()) {            cacheManager.requestMem(this);            accounting.stats();        }		return old;	}