/** * @param name * @param value */ public void addMetadata(String name, Object value) { // check if name is one of registred metadataMap.setFast(false); try { metadataMap.put(name, value); } finally { metadataMap.setFast(true); } }
private synchronized void registerInstance() { if (isNew) { int max = 0; Iterator i = dsInstanceMap.keySet().iterator(); while (i.hasNext()) { int key = ((Integer) i.next()).intValue(); max = Math.max(max, key); } instanceKey = new Integer(max + 1); FastHashMap fhm = new FastHashMap(); fhm.setFast(true); dsInstanceMap.put(instanceKey, fhm); isNew = false; } }