| |
|
| java.lang.Object java.lang.Thread org.jgroups.stack.UpHandler org.jgroups.protocols.COMPRESS
COMPRESS | public class COMPRESS extends Protocol (Code) | | Compresses the payload of a message. Goal is to reduce the number of messages sent across the wire.
Should ideally be layered somewhere above a fragmentation protocol (e.g. FRAG).
author: Bela Ban version: $Id: COMPRESS.java,v 1.12.2.1 2007/04/27 08:03:50 belaban Exp $ |
Inner Class :public static class CompressHeader extends Header implements Streamable | |
compression_level | int compression_level(Code) | | Values are from 0-9 (0=no compression, 9=best compression)
|
min_size | long min_size(Code) | | Minimal payload size of a message (in bytes) for compression to kick in
|
pool_size | int pool_size(Code) | | Number of inflaters/deflaters, for concurrency, increase this to the max number of concurrent requests possible
|
destroy | public void destroy()(Code) | | |
down | public void down(Event evt)(Code) | | We compress the payload if it is larger than min_size . In this case we add a header containing
the original size before compression. Otherwise we add no header.
Note that we compress either the entire buffer (if offset/length are not used), or a subset (if offset/length
are used)
Parameters: evt - |
up | public void up(Event evt)(Code) | | If there is no header, we pass the message up. Otherwise we uncompress the payload to its original size.
Parameters: evt - |
Fields inherited from org.jgroups.stack.UpHandler | final protected Log log(Code)(Java Doc)
|
|
|
|