Class FileCacheEntry
java.lang.Object
org.glassfish.grizzly.http.server.filecache.FileCacheEntry
- All Implemented Interfaces:
Runnable
The entry value in the file cache map.
- Author:
- Alexey Stashok
-
Field Summary
FieldsModifier and TypeFieldDescriptionorg.glassfish.grizzly.http.util.ContentTypelonglong -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanServeCompressed(org.glassfish.grizzly.http.HttpRequestPacket request) Returns true if this entry could be served compressed as response to this (passed) specificHttpRequestPacket.protected voidfinalize()getByteBuffer(boolean isCompressed) Returns the entry'sByteBufferrepresentation.getFile(boolean isCompressed) Returns the entry'sFilereference.longgetFileSize(boolean isCompressed) Returns the entry file size.voidrun()toString()
-
Field Details
-
key
-
host
-
requestURI
-
lastModified
public long lastModified -
contentType
public org.glassfish.grizzly.http.util.ContentType contentType -
xPoweredBy
-
type
-
date
-
Etag
-
lastModifiedHeader
-
server
-
timeoutMillis
public volatile long timeoutMillis
-
-
Constructor Details
-
FileCacheEntry
-
-
Method Details
-
canServeCompressed
public boolean canServeCompressed(org.glassfish.grizzly.http.HttpRequestPacket request) Returns true if this entry could be served compressed as response to this (passed) specificHttpRequestPacket. Or false will be returned otherwise. -
getFileSize
public long getFileSize(boolean isCompressed) Returns the entry file size.- Parameters:
isCompressed- if true the compressed file size will be returned, otherwise uncompressed file size will be returned as the result.- Returns:
- the entry file size
-
getFile
Returns the entry'sFilereference. -
getByteBuffer
Returns the entry'sByteBufferrepresentation.- Parameters:
isCompressed- if true the compressedByteBufferwill be returned, otherwise uncompressedByteBufferwill be returned as the result.- Returns:
- the entry's
ByteBufferreference
-
run
public void run() -
toString
-
finalize
-