1 4 package org.ofbiz.minerva.pool.cache; 5 6 import java.io.PrintWriter ; 7 8 17 public abstract class CachedObjectFactory { 18 19 public CachedObjectFactory() { 20 } 21 22 29 public abstract Object createObject(Object identifier); 30 31 43 public void cacheStarted(ObjectCache cache, PrintWriter log) { 44 if (cache == null) 45 throw new IllegalArgumentException ("Cannot start factory with null cache!"); 46 } 47 48 58 public Object prepareObject(Object cachedObject) { 59 return cachedObject; 60 } 61 62 73 public Object translateObject(Object clientObject) { 74 return clientObject; 75 } 76 77 88 public void cacheClosing(ObjectCache cache) { 89 if (cache == null) 90 throw new IllegalArgumentException ("Cannot close factory with a null cache!"); 91 } 92 93 99 public void deleteObject(Object pooledObject) { 100 } 101 } 102 | Popular Tags |