1 14 15 package org.quickserver.util.xmlreader; 16 17 22 public class ThreadObjectPoolConfig extends PoolConfig { 23 24 public ThreadObjectPoolConfig() { 25 super(); 26 } 27 28 public ThreadObjectPoolConfig(PoolConfig poolConfig) { 29 setMaxActive(poolConfig.getMaxActive()); 30 setMaxIdle(poolConfig.getMaxIdle()); 31 setInitSize(poolConfig.getInitSize()); 32 } 33 34 37 public String toXML(String pad) { 38 if(pad==null) pad=""; 39 StringBuffer sb = new StringBuffer (); 40 sb.append(pad+"<thread-object-pool>\n"); 41 sb.append(pad+"\t<max-active>"+getMaxActive()+"</max-active>\n"); 42 sb.append(pad+"\t<max-idle>"+getMaxIdle()+"</max-idle>\n"); 43 sb.append(pad+"\t<init-size>"+getInitSize()+"</init-size>\n"); 44 sb.append(pad+"</thread-object-pool>\n"); 45 return sb.toString(); 46 } 47 } 48 | Popular Tags |