List of usage examples for org.apache.commons.collections SequencedHashMap iterator
public Iterator iterator()
From source file:org.openlaszlo.cache.Cache.java
/** * @param buf buffer to append// w ww .j a va2 s .c o m * @param map map to dump */ private synchronized void dumpMap(StringBuffer buf, SequencedHashMap map, boolean lockItems) { Iterator<?> iter = map.iterator(); while (iter.hasNext()) { buf.append("<item "); Object key = iter.next(); Item item = (Item) map.get(key); if (lockItems) { item.lock(); } String keystring = key.toString(); if (keystring.length() > 128) { keystring = keystring.substring(0, 127) + "..."; } buf.append("key=\"" + XMLUtils.escapeXml(keystring) + "\" "); buf.append("in-memory=\"" + Boolean.toString(item.isInMemory()) + "\" "); buf.append("dirty=\"" + Boolean.toString(item.dirty()) + "\" "); buf.append("active=\"" + Boolean.toString(item.active()) + "\" "); buf.append("needs-reckon=\"" + Boolean.toString(item.needsReckoning()) + "\" "); buf.append("mem-to-reckon=\"" + item.memToReckon() + "\" "); buf.append("disk-to-reckon=\"" + item.diskToReckon() + "\" "); buf.append("size=\"" + item.getSize() + "\" "); buf.append("key-size=\"" + item.getKeySize() + "\" "); buf.append("path-name=\"" + item.getPathName() + "\" "); buf.append("info-name=\"" + item.getInfoName() + "\" "); long lm = item.getInfo().getLastModified(); buf.append("last-modified=\"" + lm + "\" "); buf.append("last-modified-gmt=\"" + LZHttpUtils.getDateString(lm) + "\" "); buf.append("/>\n"); if (lockItems) { item.unlock(); } } }