当前位置:首页 > Windows程序 > 正文

ehcache常用API整理

2021-03-18 Windows程序

Java代码  

public class CacheEvent implements CacheEventListener   

{  

  

    public void dispose()  

    {  

        log("in dispose");  

    }  

  

    public void notifyElementEvicted(Ehcache cache, Element element)  

    {  

        // TODO Auto-generated method stub  

        log("in notifyElementEvicted" + element);  

    }  

  

    public void notifyElementExpired(Ehcache cache, Element element)  

    {  

        // TODO Auto-generated method stub  

        log("in notifyElementExpired" + element);  

    }  

  

    public void notifyElementPut(Ehcache cache, Element element) throws CacheException  

    {  

        // TODO Auto-generated method stub  

        log("in notifyElementPut" + element);  

    }  

  

    public void notifyElementRemoved(Ehcache cache, Element element) throws CacheException  

    {  

        // TODO Auto-generated method stub  

        log("in notifyElementRemoved" + element);  

    }  

  

    public void notifyElementUpdated(Ehcache cache, Element element) throws CacheException  

    {  

        // TODO Auto-generated method stub  

        log("in notifyElementUpdated" + element);  

    }  

  

    public void notifyRemoveAll(Ehcache cache)  

    {  

        // TODO Auto-generated method stub  

        log("in notifyRemoveAll");  

    }  

     

    public Object clone() throws CloneNotSupportedException  

    {  

        return super.clone();  

    }     

     

    private void log(String s)  

    {  

        Log.debug(s);  

    }  

温馨提示: 本文由Jm博客推荐,转载请保留链接: https://www.jmwww.net/file/63036.html