Package java.util

Examples of java.util.Map.clear()


            }
        }

        if (cache != null) {
            synchronized (cache) {
                cache.clear();
            }
        }
    }
   
}
View Full Code Here


                ObjectId objectId = object.getObjectId();
                if (!id.equals(objectId)) {

                    if (objectId != null) {
                        Map replacement = id.getReplacementIdMap();
                        replacement.clear();
                        replacement.putAll(objectId.getIdSnapshot());
                    }

                    object.setObjectId(id);
                }
View Full Code Here

        if(files != null) {
            Object [] ret = new Object[files.length];
           
            Map props = new HashMap();
            for(int i = 0; i < files.length; i++) {
                props.clear();
                props.putAll(properties);
                setPrimaryKeyProperties(type, props);
                ret[i] = XMLUtil.read(files[i], props);
            }
            return ret;
View Full Code Here

            try {
                map = getProxyManager().copyMap(orig);
            } catch (Exception e) {
                map = (Map) _sm.newFieldProxy(fmd.getIndex());
            }
            map.clear();
            Object key, val;
            for (Iterator itr = orig.entrySet().iterator(); itr.hasNext();) {
                entry = (Map.Entry) itr.next();
                key = embed(fmd.getKey(), entry.getKey());
                val = entry.getValue();
View Full Code Here

    mem = displayMemoryRuntime();
    syncMap = new ConcurrentHashMap();
    populateMap(syncMap);    
    mem = displayMemoryRuntime() - mem;    
    System.out.println("ConcurrentHashMap " + mem + " bytes");
    syncMap.clear();
   
    // repeat for hashTable
    mem = displayMemoryRuntime();
    hashTable = new Hashtable();
    populateMap(hashTable);
View Full Code Here

        }
    }
   
    public void delete(Class entityClass) {
        Map entityMap = this.lookupMap(entityClass);
        entityMap.clear();
    }
   
    public Object get(Class entityClass, Object id) {
        Map entityMap = this.lookupMap(entityClass);
        return entityMap.get(id);
View Full Code Here

    assertNull("Hibernate session should be closed", first.getSession());
    assertNull("no current session", JbpmSession.getCurrentJbpmSession());

    //assertFalse("Session not closed in synchronization", first.getSession().isOpen());
   
    sessionMap.clear();
  }

  public void testReleaseOutsideTransaction() {
    log.info("ReleaseOutsideTransaction");
    JbpmSession jbpmSession = JbpmSessionFactoryUtils.getSession(this.jbpmSessionFactory);
View Full Code Here

            // there is nothing a user could do about this anyway
        }

        if (cache != null) {
            synchronized (cache) {
                cache.clear();
            }
        }
    }

    public static void cleanOpenJPACache(ClassLoader classLoader) {
View Full Code Here

public class Log4jMDCAdapter implements MDCAdapter {

  public void clear() {
    Map map = org.apache.log4j.MDC.getContext();
    if(map != null) {
      map.clear();
    }
  }

  public String get(String key) {
    return (String) org.apache.log4j.MDC.get(key);
View Full Code Here

            }
        }

        if (cache != null) {
            synchronized (cache) {
                cache.clear();
            }
        }
    }
}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.