001 package railo.runtime.util.pool; 002 003 /** 004 * Interface for a Pool 005 */ 006 public interface Pool { 007 008 /** 009 * adds a new object to the pool, if object is already in the Pool, it will be overwritten 010 * @param key key for the Objects 011 * @param handler pool handler object 012 */ 013 public void set(Object key, PoolHandler handler); 014 015 /** 016 * gets a Object from the pool 017 * @param key key for the Objects 018 * @return 019 */ 020 public PoolHandler get(Object key); 021 022 /** 023 * checks if Object exists in Pool 024 * @param key key for the Objects 025 * @return object exists or not 026 */ 027 public boolean exists(Object key); 028 029 /** 030 * remove a Object from the pool 031 * @param key key for the Objects 032 * @return 033 */ 034 public boolean remove(Object key); 035 036 }