Package org.eclipse.jetty.server
Class CachedContentFactory
java.lang.Object
org.eclipse.jetty.server.CachedContentFactory
- All Implemented Interfaces:
HttpContent.ContentFactory
@Deprecated(since="2021-05-27")
public class CachedContentFactory
extends Object
implements HttpContent.ContentFactory
Deprecated.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.classDeprecated. -
Constructor Summary
ConstructorsConstructorDescriptionCachedContentFactory(CachedContentFactory parent, ResourceFactory factory, MimeTypes mimeTypes, boolean useFileMappedBuffer, boolean etags, CompressedContentFormat[] precompressedFormats) Deprecated.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.intDeprecated.intDeprecated.getContent(String pathInContext, int maxBufferSize) Deprecated.Returns an entry from the cache, or creates a new one.intDeprecated.intDeprecated.intDeprecated.booleanDeprecated.Deprecated.voidsetMaxCachedFiles(int maxCachedFiles) Deprecated.voidsetMaxCachedFileSize(int maxCachedFileSize) Deprecated.voidsetMaxCacheSize(int maxCacheSize) Deprecated.toString()Deprecated.
-
Constructor Details
-
CachedContentFactory
public CachedContentFactory(CachedContentFactory parent, ResourceFactory factory, MimeTypes mimeTypes, boolean useFileMappedBuffer, boolean etags, CompressedContentFormat[] precompressedFormats) Deprecated.Constructor.- Parameters:
parent- the parent resource cachefactory- the resource factorymimeTypes- Mimetype to use for meta datauseFileMappedBuffer- true to file memory mapped buffersetags- true to support etagsprecompressedFormats- array of precompression formats to support
-
-
Method Details
-
getCachedSize
public int getCachedSize()Deprecated. -
getCachedFiles
public int getCachedFiles()Deprecated. -
getMaxCachedFileSize
public int getMaxCachedFileSize()Deprecated. -
setMaxCachedFileSize
public void setMaxCachedFileSize(int maxCachedFileSize) Deprecated. -
getMaxCacheSize
public int getMaxCacheSize()Deprecated. -
setMaxCacheSize
public void setMaxCacheSize(int maxCacheSize) Deprecated. -
getMaxCachedFiles
public int getMaxCachedFiles()Deprecated.- Returns:
- the max number of cached files.
-
setMaxCachedFiles
public void setMaxCachedFiles(int maxCachedFiles) Deprecated.- Parameters:
maxCachedFiles- the max number of cached files.
-
isUseFileMappedBuffer
public boolean isUseFileMappedBuffer()Deprecated. -
flushCache
public void flushCache()Deprecated. -
lookup
Deprecated.- Throws:
IOException
-
getContent
Deprecated.Returns an entry from the cache, or creates a new one.
- Specified by:
getContentin interfaceHttpContent.ContentFactory- Parameters:
pathInContext- The key into the cachemaxBufferSize- The maximum buffer size allocated for this request. For cached content, a larger buffer may have previously been allocated and returned by theHttpContent.getDirectBuffer()orHttpContent.getIndirectBuffer()calls.- Returns:
- The entry matching
pathInContext, or a new entry if no matching entry was found. If the content exists but is not cacheable, then aResourceHttpContentinstance is returned. If the resource does not exist, then null is returned. - Throws:
IOException- if the resource cannot be retrieved
-
toString
Deprecated.
-