KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > oscache > base > DummyAlwayRefreshEntryPolicy


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.oscache.base;
6
7
8 /**
9  * This is an dummy implementation of an EntryRefreshPolicy. It is just to
10  * illustrate how to use it.
11  *
12  * $Id: DummyAlwayRefreshEntryPolicy.java,v 1.1 2005/06/17 05:06:48 dres Exp $
13  * @version $Revision: 1.1 $
14  * @author <a HREF="mailto:fbeauregard@pyxis-tech.com">Francois Beauregard</a>
15  */

16 public final class DummyAlwayRefreshEntryPolicy implements EntryRefreshPolicy {
17     /**
18      * Dummy implementation of an entry refresh policy. A real implementation
19      * whould do some logic to determine if this entry needs to be refreshed.
20      * It can be calling a bean or checking some files, or even manually manage
21      * the time expiration.
22      *
23      * <p>
24      * @param entry The entry for wich to determine if a refresh is needed
25      * @return True or false
26      */

27     public boolean needsRefresh(CacheEntry entry) {
28         return true;
29     }
30 }
31
Popular Tags