1 9 10 package org.jboss.remoting.transport.socket; 11 12 13 import java.util.Set ; 14 import org.jboss.util.LRUCachePolicy; 15 16 22 public class LRUPool extends LRUCachePolicy 23 { 24 public LRUPool(int min, int max) 25 { 26 super(min, max); 27 } 28 29 protected void entryRemoved(LRUCacheEntry entry) 30 { 31 ServerThread thread = (ServerThread) entry.m_object; 32 thread.evict(); 33 } 34 35 public void evict() 36 { 37 ServerThread thread = (ServerThread) m_list.m_tail.m_object; 39 thread.evict(); 40 } 41 42 public Set getContents() 43 { 44 return m_map.keySet(); 45 } 46 47 } 48 | Popular Tags |