1 package org.jfox.pool; 2 3 6 7 public class IndexablePoolTest { 8 9 public static void main(String [] args) throws Exception { 10 AbstractIndexableObjectPool pool = new SimpleIndexableObjectPool(new SimpleObjectFactory(TestPoolableObject.class)); 11 pool.init(); 12 TestPoolableObject obj = (TestPoolableObject) pool.retrieveObject("Test"); 13 System.out.println("from PoolableObject: " + obj.say()); 14 pool.restoreObject("Test", obj); 15 pool.removeObject("Test"); 16 } 17 } 18 19 | Popular Tags |