|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.serialize.java.JavaSerializer
org.apache.wicket.serialize.java.DeflatedJavaSerializer
public class DeflatedJavaSerializer
A JavaSerializer that deflates the outputstream on the fly, reducing page store size by
up to a factor 8. Be advised that deflating serialized objects comes at a price of about 2-20ms
per page request, depending on the size of the page and the cpu power of the machine.
To use this serializer, put the following code in your application's init:
getFrameworkSettings().setSerializer(new DeflatedJavaSerializer(getApplicationKey()));
| Constructor Summary | |
|---|---|
DeflatedJavaSerializer(String applicationKey)
Construct. |
|
| Method Summary | |
|---|---|
protected Deflater |
createDeflater()
Creates the Deflater. |
protected ObjectInputStream |
newObjectInputStream(InputStream in)
Gets a new instance of an ObjectInputStream with the provided InputStream. |
protected ObjectOutputStream |
newObjectOutputStream(OutputStream out)
Gets a new instance of an ObjectOutputStream with the provided OutputStream. |
| Methods inherited from class org.apache.wicket.serialize.java.JavaSerializer |
|---|
deserialize, serialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeflatedJavaSerializer(String applicationKey)
applicationKey - | Method Detail |
|---|
protected ObjectOutputStream newObjectOutputStream(OutputStream out)
throws IOException
JavaSerializerObjectOutputStream with the provided OutputStream.
newObjectOutputStream in class JavaSerializerout - The output stream that should be used for the writing
IOException - if an I/O error occurs while writing stream headerprotected Deflater createDeflater()
Deflater. Override this method to customize the deflater, for example to
change the compression level and/or strategy.
Deflater
protected ObjectInputStream newObjectInputStream(InputStream in)
throws IOException
JavaSerializerObjectInputStream with the provided InputStream.
newObjectInputStream in class JavaSerializerin - The input stream that should be used for the reading
IOException - if an I/O error occurs while reading stream header
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||