org.apache.catalina.tribes.group.interceptors

Class MessageDispatch15Interceptor

public class MessageDispatch15Interceptor extends MessageDispatchInterceptor

Same implementation as the MessageDispatchInterceptor except is ues an atomic long for the currentSize calculation and uses a thread pool for message sending.

Version: 1.0

Author: Filip Hanik

Field Summary
protected AtomicLongcurrentSize
protected ThreadPoolExecutorexecutor
protected longkeepAliveTime
protected intmaxSpareThreads
protected intmaxThreads
protected LinkedBlockingQueue<Runnable>runnablequeue
Method Summary
longaddAndGetCurrentSize(long inc)
booleanaddToQueue(ChannelMessage msg, Member[] destination, InterceptorPayload payload)
longgetCurrentSize()
longgetKeepAliveTime()
intgetMaxSpareThreads()
intgetMaxThreads()
LinkObjectremoveFromQueue()
longsetAndGetCurrentSize(long value)
voidsetKeepAliveTime(long keepAliveTime)
voidsetMaxSpareThreads(int maxSpareThreads)
voidsetMaxThreads(int maxThreads)
voidstartQueue()
voidstopQueue()

Field Detail

currentSize

protected AtomicLong currentSize

executor

protected ThreadPoolExecutor executor

keepAliveTime

protected long keepAliveTime

maxSpareThreads

protected int maxSpareThreads

maxThreads

protected int maxThreads

runnablequeue

protected LinkedBlockingQueue<Runnable> runnablequeue

Method Detail

addAndGetCurrentSize

public long addAndGetCurrentSize(long inc)

addToQueue

public boolean addToQueue(ChannelMessage msg, Member[] destination, InterceptorPayload payload)

getCurrentSize

public long getCurrentSize()

getKeepAliveTime

public long getKeepAliveTime()

getMaxSpareThreads

public int getMaxSpareThreads()

getMaxThreads

public int getMaxThreads()

removeFromQueue

public LinkObject removeFromQueue()

setAndGetCurrentSize

public long setAndGetCurrentSize(long value)

setKeepAliveTime

public void setKeepAliveTime(long keepAliveTime)

setMaxSpareThreads

public void setMaxSpareThreads(int maxSpareThreads)

setMaxThreads

public void setMaxThreads(int maxThreads)

startQueue

public void startQueue()

stopQueue

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