|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.virtual.plugins.cache.AbstractVFSCache
org.jboss.virtual.plugins.cache.PathMatchingVFSCache
org.jboss.virtual.plugins.cache.CachePolicyVFSCache<T>
T
- exact policy typepublic abstract class CachePolicyVFSCache<T extends org.jboss.util.CachePolicy>
Cache policy vfs cache.
Field Summary |
---|
Fields inherited from class org.jboss.virtual.plugins.cache.AbstractVFSCache |
---|
log |
Constructor Summary | |
---|---|
protected |
CachePolicyVFSCache()
|
protected |
CachePolicyVFSCache(java.util.Map<java.lang.Object,java.lang.Object> properties)
|
Method Summary | |
---|---|
protected void |
check()
Is cache valid. |
protected abstract T |
createCachePolicy()
Create cache policy. |
void |
flush()
Flush the cache. |
java.lang.Iterable<VFSContext> |
getCachedContexts()
Get cached contexts. |
protected VFSContext |
getContext(java.lang.String path)
Get the cached context. |
protected static java.lang.Integer |
getInteger(java.lang.Object value)
Get integer from value. |
protected T |
getPolicy()
Get the policy. |
protected static java.lang.Integer |
parseInteger(java.lang.String value)
Parse integer. |
protected void |
putContext(java.lang.String path,
VFSContext context)
Put vfs context and its path key into cache. |
protected java.lang.Object |
readInstanceProperties(java.lang.String key,
java.lang.Object defaultValue,
boolean useSystemProperties)
Read instance properties. |
protected static java.lang.String |
readSystemProperty(java.lang.String key,
java.lang.String defaultValue)
Read system property. |
void |
removeContext(java.lang.String key,
VFSContext context)
Remove vfs context and its path key from cache. |
int |
size()
Get cache size. |
void |
start()
Start the cache. |
void |
stop()
Stop the cache. |
protected java.lang.Object |
wrapContext(VFSContext context)
Wrap the context value. |
Methods inherited from class org.jboss.virtual.plugins.cache.PathMatchingVFSCache |
---|
findContext |
Methods inherited from class org.jboss.virtual.plugins.cache.AbstractVFSCache |
---|
findContext, lastInsert, putContext, readLock, readUnlock, removeContext, writeLock, writeUnlock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CachePolicyVFSCache()
protected CachePolicyVFSCache(java.util.Map<java.lang.Object,java.lang.Object> properties)
Method Detail |
---|
public java.lang.Iterable<VFSContext> getCachedContexts()
CacheStatistics
public int size()
CacheStatistics
protected T getPolicy()
protected void check()
AbstractVFSCache
check
in class AbstractVFSCache
public void start() throws java.lang.Exception
VFSCache
java.lang.Exception
- for any errorpublic void stop()
VFSCache
public void flush()
VFSCache
protected VFSContext getContext(java.lang.String path)
AbstractVFSCache
getContext
in class AbstractVFSCache
path
- the path to match
protected void putContext(java.lang.String path, VFSContext context)
AbstractVFSCache
putContext
in class AbstractVFSCache
path
- the context's pathcontext
- the vfs contextprotected java.lang.Object wrapContext(VFSContext context)
context
- the context to wrap
public void removeContext(java.lang.String key, VFSContext context)
AbstractVFSCache
removeContext
in class AbstractVFSCache
key
- the context's pathcontext
- the vfs contextprotected abstract T createCachePolicy()
protected java.lang.Object readInstanceProperties(java.lang.String key, java.lang.Object defaultValue, boolean useSystemProperties)
key
- the property keydefaultValue
- the default valueuseSystemProperties
- do we fallback to system properties
protected static java.lang.String readSystemProperty(java.lang.String key, java.lang.String defaultValue)
key
- the property keydefaultValue
- the default value
protected static java.lang.Integer parseInteger(java.lang.String value)
value
- the string int value
protected static java.lang.Integer getInteger(java.lang.Object value)
value
- the value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |