org.apache.catalina.tribes.group.interceptors
Class MessageDispatch15Interceptor
java.lang.Object
org.apache.catalina.tribes.group.ChannelInterceptorBase
org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor
org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor
- All Implemented Interfaces:
- Runnable, ChannelInterceptor, Heartbeat, MembershipListener
public class MessageDispatch15Interceptor
- extends MessageDispatchInterceptor
Same implementation as the MessageDispatchInterceptor
except it uses an atomic long for the currentSize calculation
and uses a thread pool for message sending.
- Version:
- 1.0
- Author:
- Filip Hanik
Methods inherited from class org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor |
getMaxQueueSize, getUseDeepClone, isAlwaysSend, run, sendAsyncData, sendMessage, setAlwaysSend, setMaxQueueSize, setOptionFlag, setUseDeepClone, start, stop |
Methods inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBase |
accept, fireInterceptorEvent, getLocalMember, getMember, getMembers, getNext, getOptionFlag, getPrevious, hasMembers, heartbeat, memberAdded, memberDisappeared, messageReceived, okToProcess, setNext, setPrevious |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
currentSize
protected AtomicLong currentSize
executor
protected ThreadPoolExecutor executor
maxThreads
protected int maxThreads
maxSpareThreads
protected int maxSpareThreads
keepAliveTime
protected long keepAliveTime
runnablequeue
protected LinkedBlockingQueue<Runnable> runnablequeue
MessageDispatch15Interceptor
public MessageDispatch15Interceptor()
getCurrentSize
public long getCurrentSize()
- Overrides:
getCurrentSize
in class MessageDispatchInterceptor
addAndGetCurrentSize
public long addAndGetCurrentSize(long inc)
- Overrides:
addAndGetCurrentSize
in class MessageDispatchInterceptor
setAndGetCurrentSize
public long setAndGetCurrentSize(long value)
- Overrides:
setAndGetCurrentSize
in class MessageDispatchInterceptor
addToQueue
public boolean addToQueue(ChannelMessage msg,
Member[] destination,
InterceptorPayload payload)
- Overrides:
addToQueue
in class MessageDispatchInterceptor
removeFromQueue
public LinkObject removeFromQueue()
- Overrides:
removeFromQueue
in class MessageDispatchInterceptor
startQueue
public void startQueue()
- Overrides:
startQueue
in class MessageDispatchInterceptor
stopQueue
public void stopQueue()
- Overrides:
stopQueue
in class MessageDispatchInterceptor
getKeepAliveTime
public long getKeepAliveTime()
getMaxSpareThreads
public int getMaxSpareThreads()
getMaxThreads
public int getMaxThreads()
setKeepAliveTime
public void setKeepAliveTime(long keepAliveTime)
setMaxSpareThreads
public void setMaxSpareThreads(int maxSpareThreads)
setMaxThreads
public void setMaxThreads(int maxThreads)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.