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.
  • Constructor Details

    • CachedContentFactory

      public CachedContentFactory(CachedContentFactory parent, ResourceFactory factory, MimeTypes mimeTypes, boolean useFileMappedBuffer, boolean etags, CompressedContentFormat[] precompressedFormats)
      Deprecated.
      Constructor.
      Parameters:
      parent - the parent resource cache
      factory - the resource factory
      mimeTypes - Mimetype to use for meta data
      useFileMappedBuffer - true to file memory mapped buffers
      etags - true to support etags
      precompressedFormats - 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 public HttpContent lookup(String pathInContext) throws IOException
      Deprecated.
      Throws:
      IOException
    • getContent

      public HttpContent getContent(String pathInContext, int maxBufferSize) throws IOException
      Deprecated.

      Returns an entry from the cache, or creates a new one.

      Specified by:
      getContent in interface HttpContent.ContentFactory
      Parameters:
      pathInContext - The key into the cache
      maxBufferSize - The maximum buffer size allocated for this request. For cached content, a larger buffer may have previously been allocated and returned by the HttpContent.getDirectBuffer() or HttpContent.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 a ResourceHttpContent instance is returned. If the resource does not exist, then null is returned.
      Throws:
      IOException - if the resource cannot be retrieved
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object