MessageDispatch15Interceptor (Apache Tomcat 7.0.108 API Documentation)

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

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.catalina.tribes.ChannelInterceptor

      `ChannelInterceptor.InterceptorEvent`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AtomicLong` | `currentSize`
    `protected ExecutorService` | `executor`
    `protected long` | `keepAliveTime`
    `protected int` | `maxSpareThreads`
    `protected int` | `maxThreads`

    - ### Fields inherited from class org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor

      `alwaysSend, maxQueueSize, msgDispatchThread, queue, run, useDeepClone`

    - ### Fields inherited from class org.apache.catalina.tribes.group.ChannelInterceptorBase

      `optionFlag`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MessageDispatch15Interceptor()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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, getChannel, getLocalMember, getMember, getMembers, getNext, getOptionFlag, getPrevious, hasMembers, heartbeat, memberAdded, memberDisappeared, messageReceived, okToProcess, setChannel, setNext, setPrevious`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### currentSize

          protected AtomicLong currentSize

    - #### executor

          protected ExecutorService executor

    - #### maxThreads

          protected int maxThreads

    - #### maxSpareThreads

          protected int maxSpareThreads

    - #### keepAliveTime

          protected long keepAliveTime

  - ### 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)

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