* public class MyPooledClass { * * private static final SynchronizedPool sPool = * new SynchronizedPool(10); * * public static MyPooledClass obtain() { * MyPooledClass instance = sPool.acquire(); * return (instance != null) ? instance : new MyPooledClass(); * } * * public void recycle() { * // Clear state if needed. * sPool.release(this); * } * * . . . * } *