|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
EntryRefreshPolicy.java | - | - | - | - |
|
1 |
/*
|
|
2 |
* Copyright (c) 2002-2003 by OpenSymphony
|
|
3 |
* All rights reserved.
|
|
4 |
*/
|
|
5 |
package com.opensymphony.oscache.base;
|
|
6 |
|
|
7 |
import java.io.Serializable;
|
|
8 |
|
|
9 |
/**
|
|
10 |
* Interface that allows custom code to be called when checking to see if a cache entry
|
|
11 |
* has expired. This is useful when the rules that determine when content needs refreshing
|
|
12 |
* are beyond the base funtionality offered by OSCache.
|
|
13 |
*
|
|
14 |
* @version $Revision: 1.1 $
|
|
15 |
* @author <a href="mailto:fbeauregard@pyxis-tech.com">Francois Beauregard</a>
|
|
16 |
*/
|
|
17 |
public interface EntryRefreshPolicy extends Serializable { |
|
18 |
/**
|
|
19 |
* Indicates whether the supplied <code>CacheEntry</code> needs to be refreshed.
|
|
20 |
* This will be called when retrieving an entry from the cache - if this method
|
|
21 |
* returns <code>true</code> then a <code>NeedsRefreshException</code> will be
|
|
22 |
* thrown.
|
|
23 |
*
|
|
24 |
* @param entry The cache entry that is being tested.
|
|
25 |
* @return <code>true</code> if the content needs refreshing, <code>false</code> otherwise.
|
|
26 |
*
|
|
27 |
* @see NeedsRefreshException
|
|
28 |
* @see CacheEntry
|
|
29 |
*/
|
|
30 |
public boolean needsRefresh(CacheEntry entry); |
|
31 |
} |
|
32 |
|
|