|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.grizzly.http.FileCacheFactory
public class FileCacheFactory
A factory for creating FileCache
instance.
Field Summary | |
---|---|
InetAddress |
address
The address associated with the FileCache instance. |
protected static ConcurrentHashMap<Integer,FileCacheFactory> |
cache
Create a factory per address + port. |
protected Queue<FileCache.FileCacheEntry> |
cacheManager
The cache manager used by instance of FileCache
created by this factory; |
protected FileCache |
fileCache
A list of FileCache instance this Factory is owning. |
boolean |
isEnabled
Is the FileCache enabled. |
boolean |
isLargeFileCacheEnabled
Is the large FileCache enabled. |
protected boolean |
isMonitoringEnabled
Is monitoring enabled |
int |
maxCacheEntries
The maximum entries in the FileCache |
long |
maxEntrySize
The maximum size of a cached resources. |
long |
maxLargeFileCacheSize
The maximum cached bytes |
long |
maxSmallFileCacheSize
The maximum cached bytes |
long |
minEntrySize
The maximum size of a cached resources. |
int |
port
The port used |
int |
secondsMaxAge
Timeout before remove the static resource from the cache. |
Constructor Summary | |
---|---|
protected |
FileCacheFactory()
|
Method Summary | |
---|---|
protected void |
configureFileCache()
|
protected FileCache |
createFileCache()
|
Map<String,FileCache.FileCacheEntry> |
getCache()
Return the FileCache |
long |
getCountContentHits()
Return the Number of hits on cached file content |
long |
getCountContentMisses()
Return the Number of misses on cached file content |
long |
getCountEntries()
Return the number of current cache entries. |
long |
getCountHits()
Return the Number of cache lookup hits |
long |
getCountInfoHits()
The Number of hits on cached file info |
long |
getCountInfoMisses()
Return the number of misses on cached file info |
long |
getCountMisses()
Return the Number of cache lookup misses |
long |
getCountOpenEntries()
The number of current open cache entries |
static FileCacheFactory |
getFactory(InetAddress currentAddress,
int currentPort)
Return an instance of this Factory. |
static FileCacheFactory |
getFactory(InetAddress currentAddress,
int currentPort,
Class<? extends FileCache> fcc)
Return an instance of this Factory. |
FileCache |
getFileCache()
Return an instance of a FileCache |
int |
getFlagEnabled()
Returns flag indicating whether file cache has been enabled |
int |
getHeaderBBSize()
Retunr the header size buffer. |
boolean |
getLargeFileCacheEnabled()
Is the large file cache support enabled. |
int |
getMaxCacheEntries()
Return the maximum entries this cache can contains. |
long |
getMaxEntries()
Return the maximum number of cache entries |
long |
getMaxEntrySize()
Get the maximum size a FileCache.FileCacheEntry can have. |
long |
getMaxHeapCacheSize()
Return the maximum heap space used for cache |
long |
getMaxLargeCacheSize()
Get the maximum cache size |
long |
getMaxMmapCacheSize()
Return the Maximum Memory Map size to be used for caching |
long |
getMaxOpenEntries()
Return the maximum number of open cache entries |
long |
getMaxSmallCacheSize()
Get the maximum cache size |
long |
getMinEntrySize()
Get the maximum size a FileCache.FileCacheEntry can have. |
int |
getSecondsMaxAge()
Return the maximum age of a valid cache entry |
long |
getSizeHeapCache()
Return the heap space used for cache |
long |
getSizeMmapCache()
Return the size of Mapped memory used for caching |
boolean |
isEnabled()
Is the fileCache enabled. |
static FileCacheFactory |
newInstance(InetAddress currentAddress,
int currentPort,
Class<? extends FileCache> fcc)
Configure the factory. |
void |
setCacheManager(Queue<FileCache.FileCacheEntry> cacheManager)
|
void |
setHeaderBBSize(int headerBBSize)
Set the size of the header ByteBuffer. |
void |
setIsEnabled(boolean isE)
Is the file caching mechanism enabled. |
void |
setIsMonitoringEnabled(boolean isMonitoringEnabled)
Turn monitoring on/off |
void |
setLargeFileCacheEnabled(boolean isLargeEnabled)
Is the large file cache support enabled. |
void |
setMaxCacheEntries(int mEntries)
Set the maximum entries this cache can contains. |
void |
setMaxEntrySize(long mEntrySize)
Set the maximum size a FileCache.FileCacheEntry can have. |
void |
setMaxLargeCacheSize(long mCacheSize)
Set the maximum cache size |
void |
setMaxSmallCacheSize(long mCacheSize)
Set the maximum cache size |
void |
setMinEntrySize(long mSize)
Set the maximum size a FileCache.FileCacheEntry can have. |
void |
setSecondsMaxAge(int sMaxAges)
The timeout in seconds before remove a FileCache.FileCacheEntry
from the FileCache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int secondsMaxAge
public int maxCacheEntries
FileCache
public long minEntrySize
public long maxEntrySize
public long maxLargeFileCacheSize
public long maxSmallFileCacheSize
public boolean isEnabled
public boolean isLargeFileCacheEnabled
public int port
public InetAddress address
protected static final ConcurrentHashMap<Integer,FileCacheFactory> cache
protected Queue<FileCache.FileCacheEntry> cacheManager
FileCache
created by this factory;
protected boolean isMonitoringEnabled
protected FileCache fileCache
FileCache
instance this Factory is owning.
Constructor Detail |
---|
protected FileCacheFactory()
Method Detail |
---|
public static FileCacheFactory newInstance(InetAddress currentAddress, int currentPort, Class<? extends FileCache> fcc)
public static FileCacheFactory getFactory(InetAddress currentAddress, int currentPort)
public static FileCacheFactory getFactory(InetAddress currentAddress, int currentPort, Class<? extends FileCache> fcc)
public FileCache getFileCache()
FileCache
protected FileCache createFileCache()
protected void configureFileCache()
public void setCacheManager(Queue<FileCache.FileCacheEntry> cacheManager)
public Map<String,FileCache.FileCacheEntry> getCache()
public int getFlagEnabled()
public int getSecondsMaxAge()
public long getCountEntries()
public long getMaxEntries()
public long getCountOpenEntries()
public long getMaxOpenEntries()
public long getSizeHeapCache()
public long getMaxHeapCacheSize()
public long getSizeMmapCache()
public long getMaxMmapCacheSize()
public long getCountHits()
public long getCountMisses()
public long getCountInfoHits()
public long getCountInfoMisses()
public long getCountContentHits()
public long getCountContentMisses()
public void setIsMonitoringEnabled(boolean isMonitoringEnabled)
public void setSecondsMaxAge(int sMaxAges)
FileCache.FileCacheEntry
from the FileCache
public void setMaxCacheEntries(int mEntries)
public int getMaxCacheEntries()
public void setMinEntrySize(long mSize)
FileCache.FileCacheEntry
can have.
public long getMinEntrySize()
FileCache.FileCacheEntry
can have.
public void setMaxEntrySize(long mEntrySize)
FileCache.FileCacheEntry
can have.
public long getMaxEntrySize()
FileCache.FileCacheEntry
can have.
public void setMaxLargeCacheSize(long mCacheSize)
public long getMaxLargeCacheSize()
public void setMaxSmallCacheSize(long mCacheSize)
public long getMaxSmallCacheSize()
public boolean isEnabled()
public void setIsEnabled(boolean isE)
public void setLargeFileCacheEnabled(boolean isLargeEnabled)
public boolean getLargeFileCacheEnabled()
public int getHeaderBBSize()
public void setHeaderBBSize(int headerBBSize)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |