1 package org.apache.turbine.services.pool; 2 3 18 19 import org.apache.turbine.services.Service; 20 import org.apache.turbine.util.TurbineException; 21 22 37 public interface PoolService 38 extends Service 39 { 40 41 String SERVICE_NAME = "PoolService"; 42 43 44 int DEFAULT_POOL_CAPACITY = 128; 45 46 47 String POOL_CAPACITY_KEY = "pool.capacity"; 48 49 50 String POOL_DEBUG_KEY = "pool.debug"; 51 52 53 boolean POOL_DEBUG_DEFAULT = false; 54 55 62 Object getInstance(String className) 63 throws TurbineException; 64 65 76 Object getInstance(String className, 77 ClassLoader loader) 78 throws TurbineException; 79 80 91 Object getInstance(String className, 92 Object [] params, 93 String [] signature) 94 throws TurbineException; 95 96 111 Object getInstance(String className, 112 ClassLoader loader, 113 Object [] params, 114 String [] signature) 115 throws TurbineException; 116 117 125 boolean isLoaderSupported(String className) 126 throws TurbineException; 127 128 136 Object getInstance(Class clazz) 137 throws TurbineException; 138 139 149 Object getInstance(Class clazz, 150 Object params[], 151 String signature[]) 152 throws TurbineException; 153 154 163 boolean putInstance(Object instance); 164 165 170 int getCapacity(String className); 171 172 179 void setCapacity(String className, 180 int capacity); 181 182 187 int getSize(String className); 188 189 194 void clearPool(String className); 195 196 199 void clearPool(); 200 201 } 202 | Popular Tags |