Package org.jboss.util.collection

Examples of org.jboss.util.collection.SoftValueHashMap$SoftValueRef


    * Tests of the SoftValueHashMap
    * @throws Exception
    */
   public void testSoftValueHashMap() throws Exception
   {
      SoftValueHashMap map = new SoftValueHashMap();
      for(int n = 0; n < 1000; n ++)
      {
         String key = "Key#"+n;
         String value = "Value#"+n;
         map.put(key, value);
      }
      assertEquals("Size == 1000", 1000, map.size());
      forceSoftRefCollection();
      assertEquals("Size == 0 after gc", 0, map.size());
   }
View Full Code Here

TOP

Related Classes of org.jboss.util.collection.SoftValueHashMap$SoftValueRef

Copyright © 2018 www.massapicom. 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.