public void trimToSize(long maxSize) {
    	while (true) {
    		Object key = null;
    		ICacheable value = null;
    		synchronized (this) {
    			if (mCurrSize < 0 || (mCacheMap.isEmpty() && mCurrSize != 0)) {
                    throw new IllegalStateException(getClass().getName() + ".sizeOf() is reporting inconsistent results!");
                }

                if (mCurrSize <= maxSize || mCacheMap.isEmpty()) {
                    break;
                }
                
                Map.Entry<Object, ICacheable> toEvict = mCacheMap.entrySet().iterator().next();
                if (toEvict == null) {
                    break;
                }
                key = toEvict.getKey();
                value = toEvict.getValue();
                mCacheMap.remove(key);
                mCurrSize -= safeSizeOf(key, value);
                ++mEvictionCount;
        		System.out.println(TAG+" trimToSize remove "+key+" , value "+value);
    		}
    		if(null != value && null != key) onEntryRemove(key, value);
    	}
    }