org.jgroups.protocols
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).
Version:
- Bela Ban
down_handler , down_prot , down_queue , down_thread , down_thread_prio , log , observer , props , stack , up_handler , up_prot , up_queue , up_thread , up_thread_prio |
void | destroy() - This method is called on a
Channel.close() .
|
void | down(Event evt) - We compress the payload if it is larger than
min_size .
|
String | getName()
|
void | init() - Called after instance has been created (null constructor) and before protocol is started.
|
boolean | setProperties(Properties props) - Configures the protocol initially.
|
void | up(Event evt) - If there is no header, we pass the message up.
|
destroy , down , getDownProtocol , getDownQueue , getName , getProperties , getUpProtocol , getUpQueue , handleSpecialDownEvent , init , passDown , passUp , providedDownServices , providedUpServices , receiveDownEvent , receiveUpEvent , requiredDownServices , requiredUpServices , setDownProtocol , setObserver , setProperties , setPropertiesInternal , setProtocolStack , setUpProtocol , start , startDownHandler , startUpHandler , stop , stopInternal , up |
destroy
public void destroy()
This method is called on a
Channel.close()
.
Does some cleanup; after the call the VM will terminate
- destroy in interface Protocol
down
public void down(Event evt)
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)
- down in interface Protocol
evt
-
getName
public String getName()
- getName in interface Protocol
init
public void init()
throws Exception
Called after instance has been created (null constructor) and before protocol is started.
Properties are already set. Other protocols are not yet connected and events cannot yet be sent.
- init in interface Protocol
setProperties
public boolean setProperties(Properties props)
Configures the protocol initially. A configuration string consists of name=value
items, separated by a ';' (semicolon), e.g.:
"loopback=false;unicast_inport=4444"
- setProperties in interface Protocol
up
public void up(Event evt)
If there is no header, we pass the message up. Otherwise we uncompress the payload to its original size.
- up in interface Protocol
evt
-
Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.