001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime.cache.eh; 020 021import java.io.Serializable; 022 023import lucee.aprint; 024import net.sf.ehcache.CacheException; 025import net.sf.ehcache.Ehcache; 026import net.sf.ehcache.Element; 027import net.sf.ehcache.event.CacheEventListener; 028 029public class DummyCacheEventListener implements CacheEventListener, Serializable { 030 031 private static final long serialVersionUID = 5194911259476386528L; 032 033 034 035 public void notifyElementExpired(Ehcache cache, Element el) { 036 aprint.o("expired:"+el.getKey()); 037 } 038 039 public void notifyElementRemoved(Ehcache cache, Element el)throws CacheException { 040 041 aprint.o("removed:"+el.getKey()); 042 } 043 044 045 public void dispose() { 046 // TODO Auto-generated method stub 047 048 aprint.o("dispose:"); 049 } 050 051 public void notifyElementEvicted(Ehcache arg0, Element el) { 052 // TODO Auto-generated method stub 053 054 aprint.o("Evicted:"+el.getKey()); 055 } 056 057 public void notifyElementPut(Ehcache arg0, Element el) 058 throws CacheException { 059 // TODO Auto-generated method stub 060 aprint.o("put:"+el.getKey()); 061 062 } 063 064 public void notifyElementUpdated(Ehcache arg0, Element el) 065 throws CacheException { 066 // TODO Auto-generated method stub 067 aprint.o("updated:"+el.getKey()); 068 069 } 070 071 public void notifyRemoveAll(Ehcache arg0) { 072 // TODO Auto-generated method stub 073 aprint.o("removeAll:"); 074 075 } 076 077 078 079 @Override 080 public Object clone(){ 081 return new DummyCacheEventListener(); 082 } 083 084}