Interface ScalabilitySupportFactory


public interface ScalabilitySupportFactory
A host application can provide an instance of this interface that provides configuration and also create instances of ScalabilitySupport
  • Method Details

    • getInitialBufferSize

      int getInitialBufferSize()
      Returns:
      the initial amount of memory to allocate to the SiteMesh buffer. This should be the sweet spot of average page size to prevent excessive re-allocation.
    • getMaximumOutputLength

      long getMaximumOutputLength()
      Returns:
      the maximum output that SiteMesh will produce. If this is 0 or less then no maximum is in play
    • getMaximumOutputExceededHttpCode

      int getMaximumOutputExceededHttpCode()
      Returns:
      the HTTP code to return if the maximum output is exceeded
    • isMaxOutputLengthExceededThrown

      boolean isMaxOutputLengthExceededThrown()
      Returns:
      if this is true then the code will throw a MaxOutputLengthExceeded if the maximum output length is exceeded instead of sending back getMaximumOutputExceededHttpCode()
    • getSecondaryStorageLimit

      long getSecondaryStorageLimit()
      Returns:
      the number of bytes to keep in memory before secondary storage is usd. If this is 0 or below then no secondary storage will be used
    • hasCustomSecondaryStorage

      boolean hasCustomSecondaryStorage()
      Returns:
      if this produces a custom SecondaryStorage object
    • getSecondaryStorage

      SecondaryStorage getSecondaryStorage(jakarta.servlet.http.HttpServletRequest httpServletRequest)
      If hasCustomSecondaryStorage() returns true, then this method will be called to get a custom implementation of SecondaryStorage from the host application. This method will be invoked for every request if used.
      Returns:
      a custom secondary storage implementation