|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.cache.disk.DiskCacheUtils
Misc utils for managing the disk cache.
This tries to separate URLs into three categories:
DiskCache
Field Summary | |
static java.lang.String[] |
VALID_PROTOCOLS
Used to determine if a given URL should be cached. |
Constructor Summary | |
DiskCacheUtils()
|
Method Summary | |
static java.io.File |
getFile(DiskCache instance,
java.lang.String url)
Given a URL, determine what the filename would be within the cache. |
static java.lang.String |
getFileURL(DiskCache instance,
java.lang.String url)
Given a url and an disk cache instance, determine what the correct URL for this cache entry for the remote URL would be. |
static java.lang.String |
getLocalURL(java.lang.String virtual)
Given a virtual URL, resolve it to a local URL: Ex: /test.xml -> http://localhost:80/test.xml |
static java.lang.String |
getVirtual(java.lang.String url)
Give an full url: http://www.cnn.com/test just return the virutal portion: /test |
static boolean |
isCacheable(java.lang.String url)
Return true if the given URL should be cached or not. |
static boolean |
isCached(DiskCache instance,
java.lang.String url)
Return true if this url is in the cache. |
static boolean |
isCached(java.lang.String url)
|
static boolean |
isLocal(java.lang.String url)
Return true if this URL is on the local server. |
static boolean |
isRemote(java.lang.String url)
Return true if this URL is NOT on the local server. |
static boolean |
isVirtual(java.lang.String url)
Return true if this URL is virtual. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String[] VALID_PROTOCOLS
Constructor Detail |
public DiskCacheUtils()
Method Detail |
public static java.lang.String getVirtual(java.lang.String url)
public static java.lang.String getLocalURL(java.lang.String virtual)
public static boolean isVirtual(java.lang.String url)
public static boolean isLocal(java.lang.String url)
public static boolean isRemote(java.lang.String url)
public static boolean isCached(DiskCache instance, java.lang.String url)
DiskCache.isCached( String )
public static boolean isCached(java.lang.String url)
isCached( DiskCache, String )
public static boolean isCacheable(java.lang.String url)
public static java.io.File getFile(DiskCache instance, java.lang.String url)
public static java.lang.String getFileURL(DiskCache instance, java.lang.String url)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |