Package org.xmlresolver.cache
Class CacheInfo
- java.lang.Object
-
- org.xmlresolver.cache.CacheInfo
-
public class CacheInfo extends java.lang.Object
Information about cached URIs. URI patterns (regular expression) can be included or excluded from the cache selectively. TheCacheInfo
object provides the parameters that will be applied when caching matching URIs.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
cache
Is this pattern cached?long
cacheSize
How many entries are allowed for this pattern?long
cacheSpace
How much disk space may entries for this pattern occupy?long
deleteWait
How long are expired entries kept for this pattern?long
maxAge
Entries older thanmaxAge
will expire.java.lang.String
pattern
The pattern (regular expression) that this CacheInfo matches.java.util.regex.Pattern
uriPattern
The compiled pattern.
-
Constructor Summary
Constructors Modifier Constructor Description protected
CacheInfo(java.lang.String pattern, boolean cache)
Create an entry with default parameters.protected
CacheInfo(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.String
toString()
-
-
-
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 thanmaxAge
will 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 thanmaxAge
will expire.
-
-