Fields Summary |
---|
public int | secondsMaxAgeTimeout before remove the static resource from the cache. |
public int | maxCacheEntriesThe maximum entries in the fileCache |
public long | minEntrySizeThe maximum size of a cached resources. |
public long | maxEntrySizeThe maximum size of a cached resources. |
public long | maxLargeFileCacheSizeThe maximum cached bytes |
public long | maxSmallFileCacheSizeThe maximum cached bytes |
public static boolean | isEnabledIs the FileCache enabled. |
public boolean | isLargeFileCacheEnabledIs the large FileCache enabled. |
public int | portThe port used |
protected static final ConcurrentHashMap | cacheCreate a factory per port. |
protected ConcurrentLinkedQueue | cacheManagerThe cache manager used by instance of FileCache
created by this factory; |
protected boolean | isMonitoringEnabledIs monitoring enabled |
protected FileCache | fileCacheA list of FileCache instance this Factory is owning. |
private int | headerBBSizeThe Header ByteBuffer default size. |
Methods Summary |
---|
public java.util.concurrent.ConcurrentHashMap | getCache()Return the FileCache
if ( fileCache != null ){
return fileCache.getCache();
} else {
return null;
}
|
public long | getCountContentHits()Return the Number of hits on cached file content
if (fileCache == null) return 0L;
return fileCache.getCountContentHits();
|
public long | getCountContentMisses()Return the Number of misses on cached file content
if (fileCache == null) return 0L;
return fileCache.getCountContentMisses();
|
public long | getCountEntries()Return the number of current cache entries.
if (fileCache == null) return 0L;
return fileCache.getCountEntries();
|
public long | getCountHits()Return the Number of cache lookup hits
if (fileCache == null) return 0L;
return fileCache.getCountHits();
|
public long | getCountInfoHits()The Number of hits on cached file info
if (fileCache == null) return 0L;
return fileCache.getCountInfoHits();
|
public long | getCountInfoMisses()Return the number of misses on cached file info
if (fileCache == null) return 0L;
return fileCache.getCountInfoMisses();
|
public long | getCountMisses()Return the Number of cache lookup misses
if (fileCache == null) return 0L;
return fileCache.getCountMisses();
|
public long | getCountOpenEntries()The number of current open cache entries
if (fileCache == null) return 0L;
return fileCache.getCountOpenEntries();
|
public static com.sun.enterprise.web.connector.grizzly.FileCacheFactory | getFactory(int currentPort)Return an instance of this Factory.
FileCacheFactory fileCacheFactory = cache.get(currentPort);
if ( fileCacheFactory == null ){
fileCacheFactory = newInstance(currentPort);
}
return fileCacheFactory;
|
public FileCache | getFileCache()Return an instance of a FileCache
if ( fileCache == null){
fileCache = new FileCache();
fileCache.setIsEnabled(isEnabled);
fileCache.setLargeFileCacheEnabled(isLargeFileCacheEnabled);
fileCache.setSecondsMaxAge(secondsMaxAge);
fileCache.setMaxCacheEntries(maxCacheEntries);
fileCache.setMinEntrySize(minEntrySize);
fileCache.setMaxEntrySize(maxEntrySize);
fileCache.setMaxLargeCacheSize(maxLargeFileCacheSize);
fileCache.setMaxSmallCacheSize(maxSmallFileCacheSize);
fileCache.setCacheManager(cacheManager);
fileCache.setIsMonitoringEnabled(isMonitoringEnabled);
fileCache.setHeaderBBSize(headerBBSize);
}
return fileCache;
|
public int | getFlagEnabled()Returns flag indicating whether file cache has been enabled
return (isEnabled == true?1:0);
|
public int | getHeaderBBSize()Retunr the header size buffer.
return headerBBSize;
|
public boolean | getLargeFileCacheEnabled()Is the large file cache support enabled.
return isLargeFileCacheEnabled;
|
public int | getMaxCacheEntries()Return the maximum entries this cache can contains.
return maxCacheEntries;
|
public long | getMaxEntries()Return the maximum number of cache entries
if (fileCache == null) return 0L;
return maxCacheEntries;
|
public long | getMaxEntrySize()Get the maximum size a FileCacheEntry can have.
return maxEntrySize;
|
public long | getMaxHeapCacheSize()Return the maximum heap space used for cache
if (fileCache == null) return 0L;
return fileCache.getMaxHeapCacheSize();
|
public long | getMaxLargeCacheSize()Get the maximum cache size
return maxLargeFileCacheSize;
|
public long | getMaxMmapCacheSize()Return the Maximum Memory Map size to be used for caching
if (fileCache == null) return 0L;
return fileCache.getMaxMmapCacheSize();
|
public long | getMaxOpenEntries()Return the maximum number of open cache entries
if (fileCache == null) return 0L;
return fileCache.getMaxOpenEntries();
|
public long | getMaxSmallCacheSize()Get the maximum cache size
return maxSmallFileCacheSize;
|
public long | getMinEntrySize()Get the maximum size a FileCacheEntry can have.
return minEntrySize;
|
public int | getSecondsMaxAge()Return the maximum age of a valid cache entry
return secondsMaxAge;
|
public long | getSizeHeapCache()Return the heap space used for cache
if (fileCache == null) return 0L;
return fileCache.getSizeHeapCache();
|
public long | getSizeMmapCache()Return the size of Mapped memory used for caching
if (fileCache == null) return 0L;
return fileCache.getSizeMmapCache();
|
public static boolean | isEnabled()Is the fileCache enabled.
return isEnabled;
|
public static com.sun.enterprise.web.connector.grizzly.FileCacheFactory | newInstance(int currentPort)Configure the factory.
FileCacheFactory fileCacheFactory= new FileCacheFactory();
fileCacheFactory.port = currentPort;
cache.put(currentPort, fileCacheFactory);
ConcurrentLinkedQueue<FileCacheEntry> cacheManager =
new ConcurrentLinkedQueue<FileCacheEntry>();
fileCacheFactory.setCacheManager(cacheManager);
return fileCacheFactory;
|
public void | setCacheManager(java.util.concurrent.ConcurrentLinkedQueue cacheManager)
this.cacheManager = cacheManager;
|
public void | setHeaderBBSize(int headerBBSize)Set the size of the header ByteBuffer.
this.headerBBSize = headerBBSize;
|
public static void | setIsEnabled(boolean isE)Is the file caching mechanism enabled.
isEnabled = isE;
|
public void | setIsMonitoringEnabled(boolean isMonitoringEnabled)Turn monitoring on/off
this.isMonitoringEnabled = isMonitoringEnabled;
FileCache.setIsMonitoringEnabled(isMonitoringEnabled);
|
public void | setLargeFileCacheEnabled(boolean isLargeEnabled)Is the large file cache support enabled.
this.isLargeFileCacheEnabled = isLargeEnabled;
|
public void | setMaxCacheEntries(int mEntries)Set the maximum entries this cache can contains.
maxCacheEntries = mEntries;
|
public void | setMaxEntrySize(long mEntrySize)Set the maximum size a FileCacheEntry can have.
maxEntrySize = mEntrySize;
|
public void | setMaxLargeCacheSize(long mCacheSize)Set the maximum cache size
maxLargeFileCacheSize = mCacheSize;
|
public void | setMaxSmallCacheSize(long mCacheSize)Set the maximum cache size
maxSmallFileCacheSize = mCacheSize;
|
public void | setMinEntrySize(long mSize)Set the maximum size a FileCacheEntry can have.
minEntrySize = mSize;
|
public void | setSecondsMaxAge(int sMaxAges)The timeout in seconds before remove a FileCacheEntry
from the fileCache
secondsMaxAge = sMaxAges;
|