Class NoopSecondaryStorage
java.lang.Object
com.opensymphony.module.sitemesh.scalability.secondarystorage.NoopSecondaryStorage
- All Implemented Interfaces:
SecondaryStorage
A secondary storage that does nothing.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcleanUp()This allows you to ask the secondary storage to clean up after itself.longReturns the number of characters that should be stored in memory before this secondary storage.voidwrite(char[] chars, int off, int len) voidwrite(int c) voidvoidvoidThis method will close the "secondary storage" and write the captured output to the specified output writer.
-
Constructor Details
-
NoopSecondaryStorage
public NoopSecondaryStorage()
-
-
Method Details
-
getMemoryLimitBeforeUse
public long getMemoryLimitBeforeUse()Description copied from interface:SecondaryStorageReturns 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:
getMemoryLimitBeforeUsein interfaceSecondaryStorage- Returns:
- the memory limits in force
-
write
public void write(int c) - Specified by:
writein interfaceSecondaryStorage- See Also:
-
write
public void write(char[] chars, int off, int len) - Specified by:
writein interfaceSecondaryStorage- See Also:
-
write
- Specified by:
writein interfaceSecondaryStorage- See Also:
-
write
- Specified by:
writein interfaceSecondaryStorage- See Also:
-
writeTo
Description copied from interface:SecondaryStorageThis method will close the "secondary storage" and write the captured output to the specified output writer.- Specified by:
writeToin interfaceSecondaryStorage- Parameters:
out- the output writer to send the stored data
-
cleanUp
public void cleanUp()Description copied from interface:SecondaryStorageThis 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:
cleanUpin interfaceSecondaryStorage
-