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 java.lang.Object implements HttpContent.ContentFactory
Deprecated.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classCachedContentFactory.CachedHttpContentDeprecated.The Eclipse Jetty and Apache Felix Http Jetty packages are no longer supported.classCachedContentFactory.CachedPrecompressedHttpContentDeprecated.
-
Constructor Summary
Constructors Constructor Description CachedContentFactory(CachedContentFactory parent, ResourceFactory factory, MimeTypes mimeTypes, boolean useFileMappedBuffer, boolean etags, CompressedContentFormat[] precompressedFormats)Deprecated.Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidflushCache()Deprecated.intgetCachedFiles()Deprecated.intgetCachedSize()Deprecated.HttpContentgetContent(java.lang.String pathInContext, int maxBufferSize)Deprecated.Returns an entry from the cache, or creates a new one.intgetMaxCachedFiles()Deprecated.intgetMaxCachedFileSize()Deprecated.intgetMaxCacheSize()Deprecated.booleanisUseFileMappedBuffer()Deprecated.HttpContentlookup(java.lang.String pathInContext)Deprecated.voidsetMaxCachedFiles(int maxCachedFiles)Deprecated.voidsetMaxCachedFileSize(int maxCachedFileSize)Deprecated.voidsetMaxCacheSize(int maxCacheSize)Deprecated.java.lang.StringtoString()Deprecated.
-
-
-
Constructor Detail
-
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 Detail
-
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 public HttpContent lookup(java.lang.String pathInContext) throws java.io.IOException
Deprecated.- Throws:
java.io.IOException
-
getContent
public HttpContent getContent(java.lang.String pathInContext, int maxBufferSize) throws java.io.IOException
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:
java.io.IOException- if the resource cannot be retrieved
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toStringin classjava.lang.Object
-
-