java.lang.Object
com.opensymphony.module.sitemesh.scalability.secondarystorage.NoopSecondaryStorage
All Implemented Interfaces:
SecondaryStorage

public class NoopSecondaryStorage extends Object implements SecondaryStorage
A secondary storage that does nothing.
  • Constructor Details

    • NoopSecondaryStorage

      public NoopSecondaryStorage()
  • Method Details

    • getMemoryLimitBeforeUse

      public long getMemoryLimitBeforeUse()
      Description copied from interface: SecondaryStorage
      Returns the number of characters that should be stored in memory before this secondary storage. If this value is 0 or below then it is in fact disabled.
      Specified by:
      getMemoryLimitBeforeUse in interface SecondaryStorage
      Returns:
      the memory limits in force
    • write

      public void write(int c)
      Specified by:
      write in interface SecondaryStorage
      See Also:
    • write

      public void write(char[] chars, int off, int len)
      Specified by:
      write in interface SecondaryStorage
      See Also:
    • write

      public void write(String str, int off, int len)
      Specified by:
      write in interface SecondaryStorage
      See Also:
    • write

      public void write(String str)
      Specified by:
      write in interface SecondaryStorage
      See Also:
    • writeTo

      public void writeTo(Writer out)
      Description copied from interface: SecondaryStorage
      This method will close the "secondary storage" and write the captured output to the specified output writer.
      Specified by:
      writeTo in interface SecondaryStorage
      Parameters:
      out - the output writer to send the stored data
    • cleanUp

      public void cleanUp()
      Description copied from interface: SecondaryStorage
      This allows you to ask the secondary storage to clean up after itself. A try / finally would be a good place to put this.
      This should be able to be called multiple times because we want to be able to always cleanup in case of exceptions as well an blue sky paths.
      Really no exceptions should be propagated from this method.
      Specified by:
      cleanUp in interface SecondaryStorage