Search in sources :

Example 1 with MappedResourceManager

use of runwar.undertow.MappedResourceManager in project runwar by cfmlprojects.

the class Server method getResourceManager.

private ResourceManager getResourceManager(File warFile, Long transferMinSize, String cfmlDirs, File internalCFMLServerRoot) {
    MappedResourceManager mappedResourceManager = new MappedResourceManager(warFile, transferMinSize, cfmlDirs, internalCFMLServerRoot);
    if (serverOptions.isDirectoryListingRefreshEnabled())
        return mappedResourceManager;
    final DirectBufferCache dataCache = new DirectBufferCache(1000, 10, 1000 * 10 * 1000, BufferAllocator.DIRECT_BYTE_BUFFER_ALLOCATOR, METADATA_MAX_AGE);
    final int metadataCacheSize = 100;
    final long maxFileSize = 10000;
    return new CachingResourceManager(metadataCacheSize, maxFileSize, dataCache, mappedResourceManager, METADATA_MAX_AGE);
}
Also used : DirectBufferCache(io.undertow.server.handlers.cache.DirectBufferCache) MappedResourceManager(runwar.undertow.MappedResourceManager) CachingResourceManager(io.undertow.server.handlers.resource.CachingResourceManager)

Aggregations

DirectBufferCache (io.undertow.server.handlers.cache.DirectBufferCache)1 CachingResourceManager (io.undertow.server.handlers.resource.CachingResourceManager)1 MappedResourceManager (runwar.undertow.MappedResourceManager)1