com.notuvy.net.webcache
Class CacheQuery
java.lang.Object
com.notuvy.net.webcache.CacheQuery
public class CacheQuery
- extends Object
User: Murali
Date: 6/29/12
Time: 6:19 AM
To change this template use File | Settings | File Templates.
Field Summary |
protected static org.apache.log4j.Logger |
LOG
|
LOG
protected static final org.apache.log4j.Logger LOG
CacheQuery
protected CacheQuery(CachedWebProxy pCachedWebProxy,
String pUrl,
long pExpiration)
getUrl
public String getUrl()
getExpiration
public long getExpiration()
setExpiration
public CacheQuery setExpiration(long pExpiration,
TimeUnit pTimeUnit)
- Change the expiration of this particular query.
- Parameters:
pExpiration
- The amount of time after which a download must be done.pTimeUnit
- The unit of time defining the expiration time amount.
- Returns:
- self for cascaded calls.
hasExpired
protected boolean hasExpired(long pCreationTime)
computeExpirationTime
protected long computeExpirationTime(long pCreationTime)
lookup
public CacheResult lookup()
- Perform the full lookup (which may come from the cache).
- Returns:
- The result served from a local file.
setNoCache
public CacheQuery setNoCache()
- Define the query to not be cached. If re-queried, a download will always be done.
- Returns:
- self for cascaded calls.
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2013. All Rights Reserved.