|
||||||||||
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(Map<Object,Object> properties)
|
Method Summary | |
---|---|
protected void |
check()
Is cache valid. |
protected abstract T |
createCachePolicy()
Create cache policy. |
void |
flush()
Flush the cache. |
Iterable<VFSContext> |
getCachedContexts()
Get cached contexts. |
protected VFSContext |
getContext(String path)
Get the cached context. |
protected static Integer |
getInteger(Object value)
Get integer from value. |
protected T |
getPolicy()
Get the policy. |
protected static Integer |
parseInteger(String value)
Parse integer. |
protected void |
putContext(String path,
VFSContext context)
Put vfs context and its path key into cache. |
protected Object |
readInstanceProperties(String key,
Object defaultValue,
boolean useSystemProperties)
Read instance properties. |
protected static String |
readSystemProperty(String key,
String defaultValue)
Read system property. |
void |
removeContext(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. |
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(Map<Object,Object> properties)
Method Detail |
---|
public Iterable<VFSContext> getCachedContexts()
CacheStatistics
public int size()
CacheStatistics
protected T getPolicy()
protected void check()
AbstractVFSCache
check
in class AbstractVFSCache
public void start() throws Exception
VFSCache
Exception
- for any errorpublic void stop()
VFSCache
public void flush()
VFSCache
protected VFSContext getContext(String path)
AbstractVFSCache
getContext
in class AbstractVFSCache
path
- the path to match
protected void putContext(String path, VFSContext context)
AbstractVFSCache
putContext
in class AbstractVFSCache
path
- the context's pathcontext
- the vfs contextpublic void removeContext(String key, VFSContext context)
AbstractVFSCache
removeContext
in class AbstractVFSCache
key
- the context's pathcontext
- the vfs contextprotected abstract T createCachePolicy()
protected Object readInstanceProperties(String key, Object defaultValue, boolean useSystemProperties)
key
- the property keydefaultValue
- the default valueuseSystemProperties
- do we fallback to system properties
protected static String readSystemProperty(String key, String defaultValue)
key
- the property keydefaultValue
- the default value
protected static Integer parseInteger(String value)
value
- the string int value
protected static Integer getInteger(Object value)
value
- the value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |