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