|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.stack.Protocol
org.jgroups.protocols.COMPRESS
public class COMPRESS
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).
| Nested Class Summary | |
|---|---|
static class |
COMPRESS.CompressHeader
|
| Field Summary |
|---|
| Fields inherited from class org.jgroups.stack.Protocol |
|---|
down_prot, ergonomics, id, log, name, stack, stats, up_prot |
| Constructor Summary | |
|---|---|
COMPRESS()
|
|
| Method Summary | |
|---|---|
void |
destroy()
This method is called on a Channel.close(). |
java.lang.Object |
down(Event evt)
We compress the payload if it is larger than min_size. |
void |
init()
Called after instance has been created (null constructor) and before protocol is started. |
java.lang.Object |
up(Event evt)
If there is no header, we pass the message up. |
| Methods inherited from class org.jgroups.stack.Protocol |
|---|
dumpStats, enableStats, getConfigurableObjects, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getName, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, resetStatistics, resetStats, setDownProtocol, setErgonomics, setId, setLevel, setProtocolStack, setSocketFactory, setUpProtocol, setValue, setValues, start, statsEnabled, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public COMPRESS()
| Method Detail |
|---|
public void init()
throws java.lang.Exception
Protocol
init in class Protocoljava.lang.Exception - Thrown if protocol cannot be initialized successfully. This will cause the
ProtocolStack to fail, so the channel constructor will throw an exceptionpublic void destroy()
ProtocolChannel.close().
Does some cleanup; after the call the VM will terminate
destroy in class Protocolpublic java.lang.Object down(Event evt)
min_size. In this case we add a header containing
the original size before compression. Otherwise we add no header.
down in class Protocolevt - public java.lang.Object up(Event evt)
up in class Protocolevt -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||