001    package railo.commons.io.cache;
002    
003    import java.io.Serializable;
004    
005    /**
006     * Ac CacheEventListener is registred to a cache implementing the interface CacheEvent, a CacheEventListener can listen to certain event happening in a cache
007     */
008    public interface CacheEventListener extends Serializable {
009    
010    
011            /**
012             * this method is invoked before a Cache Entry is removed from Cache
013             * @param entry entry that will be removed from Cache
014             */
015            public void onRemove(CacheEntry entry);
016            
017            /**
018             * this method is invoked before a new Entry is putted to a cache (update and insert)
019             */
020            public void onPut(CacheEntry entry);
021            
022            /**
023             * this method is invoked before a entry expires (lifetime and idletime)
024             */
025            public void onExpires(CacheEntry entry);
026            
027            
028            public CacheEventListener duplicate();
029    }