org.jboss.virtual.plugins.cache
Class TimedVFSCache

java.lang.Object
  extended by org.jboss.virtual.plugins.cache.AbstractVFSCache
      extended by org.jboss.virtual.plugins.cache.PathMatchingVFSCache
          extended by org.jboss.virtual.plugins.cache.CachePolicyVFSCache<org.jboss.util.TimedCachePolicy>
              extended by org.jboss.virtual.plugins.cache.TimedVFSCache
All Implemented Interfaces:
CacheStatistics, VFSCache
Direct Known Subclasses:
IterableTimedVFSCache

public class TimedVFSCache
extends CachePolicyVFSCache<org.jboss.util.TimedCachePolicy>

Timed cache policy vfs cache.

Author:
Ales Justin

Field Summary
 
Fields inherited from class org.jboss.virtual.plugins.cache.AbstractVFSCache
log
 
Constructor Summary
TimedVFSCache()
           
TimedVFSCache(java.lang.Integer defaultLifetime)
           
TimedVFSCache(java.lang.Integer defaultLifetime, java.lang.Boolean threadSafe, java.lang.Integer resolution)
           
TimedVFSCache(java.util.Map<java.lang.Object,java.lang.Object> properties)
           
 
Method Summary
protected  org.jboss.util.TimedCachePolicy createCachePolicy()
          Create cache policy.
 java.lang.Iterable<VFSContext> getCachedContexts()
          Get cached contexts.
protected  java.lang.String getCacheName()
          Get the cache name.
 void setDefaultLifetime(java.lang.Integer defaultLifetime)
          Set default lifetime.
 void setResolution(java.lang.Integer resolution)
          The resollution.
 void setThreadSafe(java.lang.Boolean threadSafe)
          Set threadsafe flag.
 java.lang.String toString()
           
protected  java.lang.Object wrapContext(VFSContext context)
          Wrap the context value.
 
Methods inherited from class org.jboss.virtual.plugins.cache.CachePolicyVFSCache
check, flush, getContext, getInteger, getPolicy, parseInteger, putContext, readInstanceProperties, readSystemProperty, removeContext, size, start, stop
 
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, wait, wait, wait
 

Constructor Detail

TimedVFSCache

public TimedVFSCache()

TimedVFSCache

public TimedVFSCache(java.lang.Integer defaultLifetime)

TimedVFSCache

public TimedVFSCache(java.lang.Integer defaultLifetime,
                     java.lang.Boolean threadSafe,
                     java.lang.Integer resolution)

TimedVFSCache

public TimedVFSCache(java.util.Map<java.lang.Object,java.lang.Object> properties)
Method Detail

getCachedContexts

public java.lang.Iterable<VFSContext> getCachedContexts()
Description copied from interface: CacheStatistics
Get cached contexts.

Specified by:
getCachedContexts in interface CacheStatistics
Overrides:
getCachedContexts in class CachePolicyVFSCache<org.jboss.util.TimedCachePolicy>
Returns:
the cached contexts

createCachePolicy

protected org.jboss.util.TimedCachePolicy createCachePolicy()
Description copied from class: CachePolicyVFSCache
Create cache policy.

Specified by:
createCachePolicy in class CachePolicyVFSCache<org.jboss.util.TimedCachePolicy>
Returns:
the cache policy

getCacheName

protected java.lang.String getCacheName()
Get the cache name.

Returns:
the cache name

setDefaultLifetime

public void setDefaultLifetime(java.lang.Integer defaultLifetime)
Set default lifetime.

Parameters:
defaultLifetime - the default lifetime

setThreadSafe

public void setThreadSafe(java.lang.Boolean threadSafe)
Set threadsafe flag.

Parameters:
threadSafe - the threadsafe flag

setResolution

public void setResolution(java.lang.Integer resolution)
The resollution.

Parameters:
resolution - the resolution

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

wrapContext

protected java.lang.Object wrapContext(VFSContext context)
Description copied from class: CachePolicyVFSCache
Wrap the context value.

Overrides:
wrapContext in class CachePolicyVFSCache<org.jboss.util.TimedCachePolicy>
Parameters:
context - the context to wrap
Returns:
possibly wrapped context