org.apache.catalina.tribes.group.interceptors

Class FragmentationInterceptor

public class FragmentationInterceptor extends ChannelInterceptorBase

The fragmentation interceptor splits up large messages into smaller messages and assembles them on the other end. This is very useful when you don't want large messages hogging the sending sockets and smaller messages can make it through.
Configuration Options
OrderInteceptor.expire= - how long do we keep the fragments in memory and wait for the rest to arrivedefault=60,000ms -> 60seconds This setting is useful to avoid OutOfMemoryErrors
OrderInteceptor.maxSize= - message size in bytes default=1024*100 (around a tenth of a MB)

Version: 1.0

Author: Filip Hanik

Nested Class Summary
static classFragmentationInterceptor.FragCollection
static classFragmentationInterceptor.FragKey
Field Summary
protected booleandeepclone
protected HashMapfragpieces
Method Summary
voiddefrag(ChannelMessage msg)
voidfrag(Member[] destination, ChannelMessage msg, InterceptorPayload payload)
longgetExpire()
FragmentationInterceptor.FragCollectiongetFragCollection(FragmentationInterceptor.FragKey key, ChannelMessage msg)
intgetMaxSize()
voidheartbeat()
voidmessageReceived(ChannelMessage msg)
voidremoveFragCollection(FragmentationInterceptor.FragKey key)
voidsendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload)
voidsetExpire(long expire)
voidsetMaxSize(int maxSize)

Field Detail

deepclone

protected boolean deepclone

fragpieces

protected HashMap fragpieces

Method Detail

defrag

public void defrag(ChannelMessage msg)

frag

public void frag(Member[] destination, ChannelMessage msg, InterceptorPayload payload)

getExpire

public long getExpire()

getFragCollection

public FragmentationInterceptor.FragCollection getFragCollection(FragmentationInterceptor.FragKey key, ChannelMessage msg)

getMaxSize

public int getMaxSize()

heartbeat

public void heartbeat()

messageReceived

public void messageReceived(ChannelMessage msg)

removeFragCollection

public void removeFragCollection(FragmentationInterceptor.FragKey key)

sendMessage

public void sendMessage(Member[] destination, ChannelMessage msg, InterceptorPayload payload)

setExpire

public void setExpire(long expire)

setMaxSize

public void setMaxSize(int maxSize)
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.