Top Description Inners Fields Constructors Methods
org.glassfish.grizzly.http.server.filecache

public Class FileCache

extends Object
implements MonitoringAware<FileCacheProbe>
Class Inheritance
All Implemented Interfaces
org.glassfish.grizzly.monitoring.MonitoringAware
Imports
java.io.File, .FileInputStream, .FileOutputStream, .IOException, .InputStream, .OutputStream, java.nio.ByteBuffer, .MappedByteBuffer, java.nio.channels.FileChannel, java.nio.file.Files, java.util.StringTokenizer, java.util.concurrent.ConcurrentHashMap, .ConcurrentMap, .TimeUnit, java.util.concurrent.atomic.AtomicInteger, .AtomicLong, java.util.logging.Level, .Logger, java.util.zip.GZIPOutputStream, org.glassfish.grizzly.Grizzly, org.glassfish.grizzly.http.CompressionConfig, .HttpRequestPacket, .HttpResponsePacket, .Method, org.glassfish.grizzly.http.server.util.DateTimeFormatters, org.glassfish.grizzly.http.util.ContentType, .Header, .HttpDateFormat, .HttpStatus, .MimeHeaders, org.glassfish.grizzly.localization.LogMessages, org.glassfish.grizzly.monitoring.DefaultMonitoringConfig, .MonitoringAware, .MonitoringConfig, .MonitoringUtils, org.glassfish.grizzly.utils.DelayedExecutor

This class implements a file caching mechanism used to cache static resources.
Authors
Jeanfrancois Arcand, Scott Oaks

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
public static enum
private static class
private static class

Field Summary

Modifier and TypeField and Description
private final AtomicInteger
cacheSize

Cache size.

private volatile File
compressedFilesFolder

Folder to store compressed cached files

pack-priv static final String[]
private final CompressionConfig
compressionConfig

Compression configuration, used to decide if cached resource has to be compressed or not

private DelayedExecutor.DelayQueue<FileCacheEntry>
private boolean
enabled

Is the file cache enabled.

private final ConcurrentMap<FileCacheKey, FileCacheEntry>
fileCacheMap

A ByteBuffer cache of static pages.

private boolean
fileSendEnabled

true, if zero-copy file-send feature could be used, or false otherwise.

private final AtomicLong
heapSize

The current cache size in bytes

private static final Logger
private final AtomicLong
mappedMemorySize

The current cache size in bytes

private volatile int
maxCacheEntries

The maximum entries in the FileCache

private long
maxEntrySize

The maximum size of a cached resource.

private volatile long
maxLargeFileCacheSize

The maximum memory mapped bytes.

private volatile long
maxSmallFileCacheSize

The maximum cached bytes

private long
minEntrySize

The maximum size of a cached resource.

protected final DefaultMonitoringConfig<FileCacheProbe>
monitoringConfig

File cache probes

private final FileCacheEntry
private int
secondsMaxAge

Specifies the maximum time in seconds a resource may be cached.

private static final File

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public FileCache.CacheResult
add(final HttpRequestPacket request, final long lastModified)

Add a resource to the cache.

public FileCache.CacheResult
add(final HttpRequestPacket request, final File cacheFile)

Add a File resource to the cache.

protected FileCache.CacheResult
add(final HttpRequestPacket request, final File cacheFile, final long lastModified)

Add a resource to the cache.

protected final long
addHeapSize(long size)

protected final long
private boolean
canBeCompressed(final File cacheFile, final String contentType)

Checks if the File with the given content-type could be compressed.

private HttpStatus

Returns:

HttpStatus if the decision has been made and the response status has been defined, or null otherwise
checkIfHeaders
(final FileCacheEntry entry, final HttpRequestPacket request)

Check if the conditions specified in the optional If headers are satisfied.

private HttpStatus

Returns:

HttpStatus if the decision has been made and the response status has been defined, or null otherwise
checkIfMatch
(final FileCacheEntry
the FileCacheEntry to validate
entry
,
final HttpRequestPacket
The servlet request we are processing
request
)

Check if the if-match condition is satisfied.

private HttpStatus

Returns:

HttpStatus if the decision has been made and the response status has been defined, or null otherwise
checkIfModifiedSince
(final FileCacheEntry entry, final HttpRequestPacket request)

Check if the if-modified-since condition is satisfied.

private HttpStatus

Returns:

HttpStatus if the decision has been made and the response status has been defined, or null otherwise
checkIfNoneMatch
(final FileCacheEntry entry, final HttpRequestPacket request)

Check if the if-none-match condition is satisfied.

private HttpStatus

Returns:

HttpStatus if the decision has been made and the response status has been defined, or null otherwise
checkIfUnmodifiedSince
(final FileCacheEntry entry, final HttpRequestPacket request)

Check if the if-unmodified-since condition is satisfied.

protected void
compressFile(final FileCacheEntry entry)

Creates a temporary compressed representation of the given cache entry.

protected static long
convertToLong(final String dateHeader)

private FileCacheEntry
createEntry(final File file)

Creates FileCacheEntry.

protected Object
public FileCacheEntry
get(final HttpRequestPacket request)

Returns FileCacheEntry.

public File
getCompressedFilesFolder()

Returns the folder to be used to store temporary compressed files.

public CompressionConfig
getCompressionConfig()

Returns the FileCache compression configuration settings.

public long

Returns:

heap size
getHeapCacheSize
()

Return the heap space used for cache

public long

Returns:

Mapped memory size
getMappedCacheSize
()

Return the size of Mapped memory used for caching

public int
getMaxCacheEntries()

Returns: the maximum number of files that may be cached.

public long
getMaxEntrySize()

Returns: the maximum size, in bytes, a resource may be before it can no longer be considered cacheable.

public long
getMaxLargeFileCacheSize()

Returns: the maximum size of the memory mapped cache for large files.

public long
getMaxSmallFileCacheSize()

Returns: the maximum size, in bytes, of the heap cache for files below the water mark set by getMinEntrySize().

public long
getMinEntrySize()

Returns: the minimum size, in bytes, a file must be in order to be cached in the heap cache.

public MonitoringConfig<FileCacheProbe>
public int
getSecondsMaxAge()

Returns: the maximum time, in seconds, a file may be cached.

public void
initialize(final DelayedExecutor delayedExecutor)

public boolean
isEnabled()

Returns: true if the FileCache is enabled, otherwise false

public boolean
protected static void
notifyProbesEntryAdded(final FileCache
the FileCache event occurred on.
fileCache
,
final FileCacheEntry
entry been added
entry
)

Notify registered FileCacheProbes about the "entry added" event.

protected static void
notifyProbesEntryHit(final FileCache
the FileCache event occurred on.
fileCache
,
final FileCacheEntry
entry been hit.
entry
)

Notify registered FileCacheProbes about the "entry hit event.

protected static void
notifyProbesEntryMissed(final FileCache
the FileCache event occurred on.
fileCache
,
final HttpRequestPacket
HTTP request.
request
)

Notify registered FileCacheProbes about the "entry missed" event.

protected static void
notifyProbesEntryRemoved(final FileCache
the FileCache event occurred on.
fileCache
,
final FileCacheEntry
entry been removed
entry
)

Notify registered FileCacheProbes about the "entry removed" event.

protected static void
notifyProbesError(final FileCache
the FileCache event occurred on.
fileCache
,
final Throwable error)

Notify registered FileCacheProbes about the error.

protected void
remove(final FileCacheEntry entry)

public void
setCompressedFilesFolder(final File compressedFilesFolder)

Sets the folder to be used to store temporary compressed files.

public void
setEnabled(boolean
true to enable the FileCache.
enabled
)

Enables/disables the FileCache.

public void
public void
setMaxCacheEntries(int
the maximum number of files that may be cached.
maxCacheEntries
)

Sets the maximum number of files that may be cached.

public void
setMaxEntrySize(long
the maximum size, in bytes, a resource may be before it can no longer be considered cacheable.
maxEntrySize
)

The maximum size, in bytes, a resource may be before it can no longer be considered cacheable.

public void
setMaxLargeFileCacheSize(long
the maximum size, in bytes, of the memory mapped cache for large files.
maxLargeFileCacheSize
)

Sets the maximum size, in bytes, of the memory mapped cache for large files.

public void
setMaxSmallFileCacheSize(long
the maximum size, in bytes, of the heap cache for files below the water mark set by getMinEntrySize().
maxSmallFileCacheSize
)

The maximum size, in bytes, of the heap cache for files below the water mark set by getMinEntrySize().

public void
setMinEntrySize(long
the maximum size, in bytes, a file must be in order to be cached in the heap cache.
minEntrySize
)

The maximum size, in bytes, a file must be in order to be cached in the heap cache.

public void
setSecondsMaxAge(int
max age of a cached file, in seconds.
secondsMaxAge
)

Sets the maximum time, in seconds, a file may be cached.

protected final long
subHeapSize(long size)

protected final long
private FileCacheEntry

Returns:

the preinitialized FileCacheEntry
tryMapFileToBuffer
(final File file)

Map the file to a ByteBuffer

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheSizeback to summary
private final AtomicInteger cacheSize

Cache size.

compressedFilesFolderback to summary
private volatile File compressedFilesFolder

Folder to store compressed cached files

COMPRESSION_ALIASESback to summary
pack-priv static final String[] COMPRESSION_ALIASES
compressionConfigback to summary
private final CompressionConfig compressionConfig

Compression configuration, used to decide if cached resource has to be compressed or not

delayQueueback to summary
private DelayedExecutor.DelayQueue<FileCacheEntry> delayQueue
enabledback to summary
private boolean enabled

Is the file cache enabled.

fileCacheMapback to summary
private final ConcurrentMap<FileCacheKey, FileCacheEntry> fileCacheMap

A ByteBuffer cache of static pages.

fileSendEnabledback to summary
private boolean fileSendEnabled

true, if zero-copy file-send feature could be used, or false otherwise.

heapSizeback to summary
private final AtomicLong heapSize

The current cache size in bytes

LOGGERback to summary
private static final Logger LOGGER
mappedMemorySizeback to summary
private final AtomicLong mappedMemorySize

The current cache size in bytes

maxCacheEntriesback to summary
private volatile int maxCacheEntries

The maximum entries in the FileCache

maxEntrySizeback to summary
private long maxEntrySize

The maximum size of a cached resource.

maxLargeFileCacheSizeback to summary
private volatile long maxLargeFileCacheSize

The maximum memory mapped bytes.

maxSmallFileCacheSizeback to summary
private volatile long maxSmallFileCacheSize

The maximum cached bytes

minEntrySizeback to summary
private long minEntrySize

The maximum size of a cached resource.

monitoringConfigback to summary
protected final DefaultMonitoringConfig<FileCacheProbe> monitoringConfig

File cache probes

NULL_CACHE_ENTRYback to summary
private final FileCacheEntry NULL_CACHE_ENTRY
secondsMaxAgeback to summary
private int secondsMaxAge

Specifies the maximum time in seconds a resource may be cached.

TMP_DIRback to summary
private static final File TMP_DIR

Constructor Detail

FileCacheback to summary
public FileCache()

Method Detail

addback to summary
public FileCache.CacheResult add(final HttpRequestPacket request, final long lastModified)

Add a resource to the cache. Unlike the add(org.glassfish.grizzly.http.HttpRequestPacket, java.io.File) this method adds a resource to a cache but is not able to send the resource content to a client if client doesn't have the latest version of this resource.

addback to summary
public FileCache.CacheResult add(final HttpRequestPacket request, final File cacheFile)

Add a File resource to the cache. If a client comes with not the latest version of this resource - the FileCache will return it the latest resource version.

addback to summary
protected FileCache.CacheResult add(final HttpRequestPacket request, final File cacheFile, final long lastModified)

Add a resource to the cache.

addHeapSizeback to summary
protected final long addHeapSize(long size)
addMappedMemorySizeback to summary
protected final long addMappedMemorySize(long size)
canBeCompressedback to summary
private boolean canBeCompressed(final File cacheFile, final String contentType)

Checks if the File with the given content-type could be compressed.

checkIfHeadersback to summary
private HttpStatus checkIfHeaders(final FileCacheEntry entry, final HttpRequestPacket request) throws IOException

Check if the conditions specified in the optional If headers are satisfied.

Returns:HttpStatus

HttpStatus if the decision has been made and the response status has been defined, or null otherwise

checkIfMatchback to summary
private HttpStatus checkIfMatch(final FileCacheEntry entry, final HttpRequestPacket request) throws IOException

Check if the if-match condition is satisfied.

Parameters
entry:FileCacheEntry

the FileCacheEntry to validate

request:HttpRequestPacket

The servlet request we are processing

Returns:HttpStatus

HttpStatus if the decision has been made and the response status has been defined, or null otherwise

checkIfModifiedSinceback to summary
private HttpStatus checkIfModifiedSince(final FileCacheEntry entry, final HttpRequestPacket request) throws IOException

Check if the if-modified-since condition is satisfied.

Returns:HttpStatus

HttpStatus if the decision has been made and the response status has been defined, or null otherwise

checkIfNoneMatchback to summary
private HttpStatus checkIfNoneMatch(final FileCacheEntry entry, final HttpRequestPacket request) throws IOException

Check if the if-none-match condition is satisfied.

Returns:HttpStatus

HttpStatus if the decision has been made and the response status has been defined, or null otherwise

checkIfUnmodifiedSinceback to summary
private HttpStatus checkIfUnmodifiedSince(final FileCacheEntry entry, final HttpRequestPacket request) throws IOException

Check if the if-unmodified-since condition is satisfied.

Returns:HttpStatus

HttpStatus if the decision has been made and the response status has been defined, or null otherwise

compressFileback to summary
protected void compressFile(final FileCacheEntry entry)

Creates a temporary compressed representation of the given cache entry.

convertToLongback to summary
protected static long convertToLong(final String dateHeader)
createEntryback to summary
private FileCacheEntry createEntry(final File file)

Creates FileCacheEntry.

createJmxManagementObjectback to summary
protected Object createJmxManagementObject()
getback to summary
public FileCacheEntry get(final HttpRequestPacket request)

Returns FileCacheEntry. If FileCacheEntry has been found - this method also sets correspondent HttpResponsePacket status code and reason phrase.

getCompressedFilesFolderback to summary
public File getCompressedFilesFolder()

Returns the folder to be used to store temporary compressed files.

getCompressionConfigback to summary
public CompressionConfig getCompressionConfig()

Returns the FileCache compression configuration settings.

getHeapCacheSizeback to summary
public long getHeapCacheSize()

Return the heap space used for cache

Returns:long

heap size

getMappedCacheSizeback to summary
public long getMappedCacheSize()

Return the size of Mapped memory used for caching

Returns:long

Mapped memory size

getMaxCacheEntriesback to summary
public int getMaxCacheEntries()
Returns:int

the maximum number of files that may be cached.

getMaxEntrySizeback to summary
public long getMaxEntrySize()
Returns:long

the maximum size, in bytes, a resource may be before it can no longer be considered cacheable.

getMaxLargeFileCacheSizeback to summary
public long getMaxLargeFileCacheSize()
Returns:long

the maximum size of the memory mapped cache for large files.

getMaxSmallFileCacheSizeback to summary
public long getMaxSmallFileCacheSize()
Returns:long

the maximum size, in bytes, of the heap cache for files below the water mark set by getMinEntrySize().

getMinEntrySizeback to summary
public long getMinEntrySize()
Returns:long

the minimum size, in bytes, a file must be in order to be cached in the heap cache.

getMonitoringConfigback to summary
public MonitoringConfig<FileCacheProbe> getMonitoringConfig()

Implements org.glassfish.grizzly.monitoring.MonitoringAware.getMonitoringConfig.

Doc from org.glassfish.grizzly.monitoring.MonitoringAware.getMonitoringConfig.

Return the object associated MonitoringConfig.

Annotations
@Override
getSecondsMaxAgeback to summary
public int getSecondsMaxAge()
Returns:int

the maximum time, in seconds, a file may be cached.

initializeback to summary
public void initialize(final DelayedExecutor delayedExecutor)
isEnabledback to summary
public boolean isEnabled()
Returns:boolean

true if the FileCache is enabled, otherwise false

isFileSendEnabledback to summary
public boolean isFileSendEnabled()

Returns true if File resources may be be sent using java.nio.channels.FileChannel#transferTo(long, long, java.nio.channels.WritableByteChannel).

By default, this property will be true, except in the following cases:

  • JVM OS is HP-UX
  • JVM OS is Linux, and the Oracle JVM in use is 1.6.0_17 or older

Finally, if the connection between endpoints is secure, send file functionality will be disabled regardless of configuration.

Returns:boolean

true if resources will be sent using java.nio.channels.FileChannel#transferTo(long, long, java.nio.channels.WritableByteChannel).

Since
2.3.5
notifyProbesEntryAddedback to summary
protected static void notifyProbesEntryAdded(final FileCache fileCache, final FileCacheEntry entry)

Notify registered FileCacheProbes about the "entry added" event.

Parameters
fileCache:FileCache

the FileCache event occurred on.

entry:FileCacheEntry

entry been added

notifyProbesEntryHitback to summary
protected static void notifyProbesEntryHit(final FileCache fileCache, final FileCacheEntry entry)

Notify registered FileCacheProbes about the "entry hit event.

Parameters
fileCache:FileCache

the FileCache event occurred on.

entry:FileCacheEntry

entry been hit.

notifyProbesEntryMissedback to summary
protected static void notifyProbesEntryMissed(final FileCache fileCache, final HttpRequestPacket request)

Notify registered FileCacheProbes about the "entry missed" event.

Parameters
fileCache:FileCache

the FileCache event occurred on.

request:HttpRequestPacket

HTTP request.

notifyProbesEntryRemovedback to summary
protected static void notifyProbesEntryRemoved(final FileCache fileCache, final FileCacheEntry entry)

Notify registered FileCacheProbes about the "entry removed" event.

Parameters
fileCache:FileCache

the FileCache event occurred on.

entry:FileCacheEntry

entry been removed

notifyProbesErrorback to summary
protected static void notifyProbesError(final FileCache fileCache, final Throwable error)

Notify registered FileCacheProbes about the error.

Parameters
fileCache:FileCache

the FileCache event occurred on.

removeback to summary
protected void remove(final FileCacheEntry entry)
setCompressedFilesFolderback to summary
public void setCompressedFilesFolder(final File compressedFilesFolder)

Sets the folder to be used to store temporary compressed files.

setEnabledback to summary
public void setEnabled(boolean enabled)

Enables/disables the FileCache. By default, the FileCache is disabled.

Parameters
enabled:boolean

true to enable the FileCache.

setFileSendEnabledback to summary
public void setFileSendEnabled(boolean fileSendEnabled)

Configure whether or send-file support will enabled which allows sending java.io.File resources via java.nio.channels.FileChannel#transferTo(long, long, java.nio.channels.WritableByteChannel). If disabled, the more traditional byte[] copy will be used to send content.

Parameters
fileSendEnabled:boolean

true to enable java.nio.channels.FileChannel#transferTo(long, long, java.nio.channels.WritableByteChannel) support.

Since
2.3.5
setMaxCacheEntriesback to summary
public void setMaxCacheEntries(int maxCacheEntries)

Sets the maximum number of files that may be cached.

Parameters
maxCacheEntries:int

the maximum number of files that may be cached.

setMaxEntrySizeback to summary
public void setMaxEntrySize(long maxEntrySize)

The maximum size, in bytes, a resource may be before it can no longer be considered cacheable.

Parameters
maxEntrySize:long

the maximum size, in bytes, a resource may be before it can no longer be considered cacheable.

setMaxLargeFileCacheSizeback to summary
public void setMaxLargeFileCacheSize(long maxLargeFileCacheSize)

Sets the maximum size, in bytes, of the memory mapped cache for large files.

Parameters
maxLargeFileCacheSize:long

the maximum size, in bytes, of the memory mapped cache for large files.

setMaxSmallFileCacheSizeback to summary
public void setMaxSmallFileCacheSize(long maxSmallFileCacheSize)

The maximum size, in bytes, of the heap cache for files below the water mark set by getMinEntrySize().

Parameters
maxSmallFileCacheSize:long

the maximum size, in bytes, of the heap cache for files below the water mark set by getMinEntrySize().

setMinEntrySizeback to summary
public void setMinEntrySize(long minEntrySize)

The maximum size, in bytes, a file must be in order to be cached in the heap cache.

Parameters
minEntrySize:long

the maximum size, in bytes, a file must be in order to be cached in the heap cache.

setSecondsMaxAgeback to summary
public void setSecondsMaxAge(int secondsMaxAge)

Sets the maximum time, in seconds, a file may be cached.

Parameters
secondsMaxAge:int

max age of a cached file, in seconds.

subHeapSizeback to summary
protected final long subHeapSize(long size)
subMappedMemorySizeback to summary
protected final long subMappedMemorySize(long size)
tryMapFileToBufferback to summary
private FileCacheEntry tryMapFileToBuffer(final File file)

Map the file to a ByteBuffer

Returns:FileCacheEntry

the preinitialized FileCacheEntry

org.glassfish.grizzly.http.server.filecache back to summary

public final Enum FileCache.CacheResult

extends Enum<FileCache.CacheResult>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final FileCache.CacheResult
public static final FileCache.CacheResult
public static final FileCache.CacheResult
public static final FileCache.CacheResult
public static final FileCache.CacheResult

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static FileCache.CacheResult
public static FileCache.CacheResult[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

FAILEDback to summary
public static final FileCache.CacheResult FAILED
FAILED_CACHE_FULLback to summary
public static final FileCache.CacheResult FAILED_CACHE_FULL
FAILED_ENTRY_EXISTSback to summary
public static final FileCache.CacheResult FAILED_ENTRY_EXISTS
OK_CACHEDback to summary
public static final FileCache.CacheResult OK_CACHED
OK_CACHED_TIMESTAMPback to summary
public static final FileCache.CacheResult OK_CACHED_TIMESTAMP

Constructor Detail

CacheResultback to summary
private CacheResult()

Method Detail

valueOfback to summary
public static FileCache.CacheResult valueOf(String name)
valuesback to summary
public static FileCache.CacheResult[] values()
org.glassfish.grizzly.http.server.filecache back to summary

public final Enum FileCache.CacheType

extends Enum<FileCache.CacheType>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final FileCache.CacheType
public static final FileCache.CacheType
public static final FileCache.CacheType
public static final FileCache.CacheType

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static FileCache.CacheType
public static FileCache.CacheType[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

FILEback to summary
public static final FileCache.CacheType FILE
HEAPback to summary
public static final FileCache.CacheType HEAP
MAPPEDback to summary
public static final FileCache.CacheType MAPPED
TIMESTAMPback to summary
public static final FileCache.CacheType TIMESTAMP

Constructor Detail

CacheTypeback to summary
private CacheType()

Method Detail

valueOfback to summary
public static FileCache.CacheType valueOf(String name)
valuesback to summary
public static FileCache.CacheType[] values()
org.glassfish.grizzly.http.server.filecache back to summary

private Class FileCache.EntryResolver

extends Object
implements DelayedExecutor.Resolver<FileCacheEntry>
Class Inheritance
  • java.lang.Object
  • org.glassfish.grizzly.http.server.filecache.FileCache.EntryResolver
All Implemented Interfaces
org.glassfish.grizzly.utils.DelayedExecutor.Resolver

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public long
public boolean
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EntryResolverback to summary
private EntryResolver()

Method Detail

getTimeoutMillisback to summary
public long getTimeoutMillis(FileCacheEntry element)

Implements org.glassfish.grizzly.utils.DelayedExecutor.Resolver.getTimeoutMillis.

Annotations
@Override
removeTimeoutback to summary
public boolean removeTimeout(FileCacheEntry element)

Implements org.glassfish.grizzly.utils.DelayedExecutor.Resolver.removeTimeout.

Annotations
@Override
setTimeoutMillisback to summary
public void setTimeoutMillis(FileCacheEntry element, long timeoutMillis)

Implements org.glassfish.grizzly.utils.DelayedExecutor.Resolver.setTimeoutMillis.

Annotations
@Override
org.glassfish.grizzly.http.server.filecache back to summary

private Class FileCache.EntryWorker

extends Object
implements DelayedExecutor.Worker<FileCacheEntry>
Class Inheritance
  • java.lang.Object
  • org.glassfish.grizzly.http.server.filecache.FileCache.EntryWorker
All Implemented Interfaces
org.glassfish.grizzly.utils.DelayedExecutor.Worker

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public boolean
doWork(final FileCacheEntry element)

Implements org.glassfish.grizzly.utils.DelayedExecutor.Worker.doWork.

The method is executed by DelayExecutor once element's timeout expires.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

EntryWorkerback to summary
private EntryWorker()

Method Detail

doWorkback to summary
public boolean doWork(final FileCacheEntry element)

Implements org.glassfish.grizzly.utils.DelayedExecutor.Worker.doWork.

Doc from org.glassfish.grizzly.utils.DelayedExecutor.Worker.doWork.

The method is executed by DelayExecutor once element's timeout expires.

Annotations
@Override