Apache Tomcat 6.0.41

org.apache.catalina.tribes.group.interceptors
Class MessageDispatch15Interceptor

java.lang.Object
  extended by org.apache.catalina.tribes.group.ChannelInterceptorBase
      extended by org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor
          extended by org.apache.catalina.tribes.group.interceptors.MessageDispatch15Interceptor
All Implemented Interfaces:
java.lang.Runnable, ChannelInterceptor, Heartbeat, MembershipListener

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

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.catalina.tribes.ChannelInterceptor
ChannelInterceptor.InterceptorEvent
 
Field Summary
protected  java.util.concurrent.atomic.AtomicLong currentSize
           
protected  java.util.concurrent.ThreadPoolExecutor executor
           
protected  long keepAliveTime
           
protected  int maxSpareThreads
           
protected  int maxThreads
           
protected  java.util.concurrent.LinkedBlockingQueue<java.lang.Runnable> runnablequeue
           
 
Fields inherited from class org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor
alwaysSend, log, maxQueueSize, msgDispatchThread, queue, run, useDeepClone
 
Fields inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBase
optionFlag
 
Constructor Summary
MessageDispatch15Interceptor()
           
 
Method Summary
 long addAndGetCurrentSize(long inc)
           
 boolean addToQueue(ChannelMessage msg, Member[] destination, InterceptorPayload payload)
           
 long getCurrentSize()
           
 long getKeepAliveTime()
           
 int getMaxSpareThreads()
           
 int getMaxThreads()
           
 LinkObject removeFromQueue()
           
 long setAndGetCurrentSize(long value)
           
 void setKeepAliveTime(long keepAliveTime)
           
 void setMaxSpareThreads(int maxSpareThreads)
           
 void setMaxThreads(int maxThreads)
           
 void startQueue()
           
 void stopQueue()
           
 
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
 

Field Detail

currentSize

protected java.util.concurrent.atomic.AtomicLong currentSize

executor

protected java.util.concurrent.ThreadPoolExecutor executor

maxThreads

protected int maxThreads

maxSpareThreads

protected int maxSpareThreads

keepAliveTime

protected long keepAliveTime

runnablequeue

protected java.util.concurrent.LinkedBlockingQueue<java.lang.Runnable> runnablequeue
Constructor Detail

MessageDispatch15Interceptor

public MessageDispatch15Interceptor()
Method Detail

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)

Apache Tomcat 6.0.41

Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.