Package org.xmlresolver.cache
Class CacheInfo
- java.lang.Object
-
- org.xmlresolver.cache.CacheInfo
-
public class CacheInfo extends java.lang.ObjectInformation about cached URIs. URI patterns (regular expression) can be included or excluded from the cache selectively. TheCacheInfoobject provides the parameters that will be applied when caching matching URIs.
-
-
Field Summary
Fields Modifier and Type Field Description booleancacheIs this pattern cached?longcacheSizeHow many entries are allowed for this pattern?longcacheSpaceHow much disk space may entries for this pattern occupy?longdeleteWaitHow long are expired entries kept for this pattern?longmaxAgeEntries older thanmaxAgewill expire.java.lang.StringpatternThe pattern (regular expression) that this CacheInfo matches.java.util.regex.PatternuriPatternThe compiled pattern.
-
Constructor Summary
Constructors Modifier Constructor Description protectedCacheInfo(java.lang.String pattern, boolean cache)Create an entry with default parameters.protectedCacheInfo(java.lang.String pattern, boolean cache, long deleteWait, long cacheSize, long cacheSpace, long maxAge)Create an entry with explicit parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringtoString()
-
-
-
Field Detail
-
cache
public final boolean cache
Is this pattern cached?
-
pattern
public final java.lang.String pattern
The pattern (regular expression) that this CacheInfo matches.
-
uriPattern
public final java.util.regex.Pattern uriPattern
The compiled pattern.
-
deleteWait
public final long deleteWait
How long are expired entries kept for this pattern?
-
cacheSize
public final long cacheSize
How many entries are allowed for this pattern?
-
cacheSpace
public final long cacheSpace
How much disk space may entries for this pattern occupy?
-
maxAge
public final long maxAge
Entries older thanmaxAgewill expire.
-
-
Constructor Detail
-
CacheInfo
protected CacheInfo(java.lang.String pattern, boolean cache)Create an entry with default parameters.- Parameters:
pattern- The regular expression to match against.cache- Should this URI be included (true) or excluded (false) from the cache.- See Also:
ResourceCache
-
CacheInfo
protected CacheInfo(java.lang.String pattern, boolean cache, long deleteWait, long cacheSize, long cacheSpace, long maxAge)Create an entry with explicit parameters.- Parameters:
pattern- The regular expression to match against.cache- Should this URI be included (true) or excluded (false) from the cache.deleteWait- How long are expired entries kept for this pattern?cacheSize- How many entries are allowed for this pattern?cacheSpace- How much disk space may entries for this pattern occupy?maxAge- Entries older thanmaxAgewill expire.
-
-