• 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • The Channel Interceptor object

    Table of Contents

    Introduction

    七乐彩开奖结果 www.eleieg.com Apache Tribes supports an interceptor architecture to intercept both messages and membership notifications. This architecture allows decoupling of logic and opens the way for some very kewl feature add ons.

    Available Interceptors

    • org.apache.catalina.tribes.group.interceptors.TcpFailureDetector
    • org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor
    • org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor
    • org.apache.catalina.tribes.group.interceptors.NonBlockingCoordinator
    • org.apache.catalina.tribes.group.interceptors.OrderInterceptor
    • org.apache.catalina.tribes.group.interceptors.SimpleCoordinator
    • org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor
    • org.apache.catalina.tribes.group.interceptors.TwoPhaseCommitInterceptor
    • org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor
    • org.apache.catalina.tribes.group.interceptors.FragmentationInterceptor
    • org.apache.catalina.tribes.group.interceptors.GzipInterceptor
    • org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor

    Static Membership

    In addition to dynamic discovery, Apache Tribes also supports static membership, with membership verification. To achieve this add the org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor underneath the org.apache.catalina.tribes.group.interceptors.TcpFailureDetector interceptor. Inside the StaticMembershipInterceptor you can add the static members you wish to have. The TcpFailureDetector will do a health check on the static members,and also monitor them for crashes so they will have the same level of notification mechanism as the members that are automatically discovered.

         <Interceptor className="org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor">
           <LocalMember className="org.apache.catalina.tribes.membership.StaticMember"
                      domain="staging-cluster"
                      uniqueId="{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,1}"/>
           <Member className="org.apache.catalina.tribes.membership.StaticMember"
                      port="5678"
                      securePort="-1"
                      host="tomcat01.mydomain.com"
                      domain="staging-cluster"
                      uniqueId="{0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}"/>
         </Interceptor>

    Attributes

    Common Attributes

    Attribute Description
    className Required, as there is no default
    optionFlag If you want the interceptor to trigger on certain message depending on the message's option flag, you can setup the interceptors flag here. The default value is 0, meaning this interceptor will trigger on all messages.

    org.apache.catalina.tribes.group.interceptors.DomainFilterInterceptor Attributes

    Attribute Description
    domain The logical cluster domain that this Interceptor accepts. Two different type of values are possible:
    1. Regular string values like "staging-domain" or "tomcat-cluster" will be converted into bytes using ISO-8859-1 encoding.
    2. byte array in string form, for example {216,123,12,3}
    logInterval This value indicates the interval for logging for messages from different domains. The default is 100, which means that to log per 100 messages.

    org.apache.catalina.tribes.group.interceptors.MessageDispatchInterceptor Attributes

    Attribute Description
    optionFlag The default and hard coded value is 8 (org.apache.catalina.tribes.Channel.SEND_OPTIONS_ASYNCHRONOUS). The dispatcher will trigger on this value only, as it is predefined by Tribes.
    alwaysSend What behavior should be executed when the dispatch queue is full. If true (default), then the message is is sent synchronously, if false an error is thrown.
    maxQueueSize Size in bytes of the dispatch queue, the default value is 1024*1024*64 (64MB) sets the maximum queue size for the dispatch queue if the queue fills up, one can trigger the behavior, if alwaysSend is set to true, the message will be sent synchronously if the flag is false, an error is thrown
    maxThreads The maximum number of threads in this pool, default is 10.
    maxSpareThreads The number of threads to keep in the pool, default is 2.
    keepAliveTime Maximum number of milliseconds of until Idle thread terminates. Default value is 5000(5 seconds).

    org.apache.catalina.tribes.group.interceptors.TcpFailureDetector Attributes

    Attribute Description
    connectTimeout Specifies the timeout, in milliseconds, to use when attempting a TCP connection to the suspect node. Default is 1000.
    performSendTest If true is set, send a test message to the suspect node. Default is true.
    performReadTest If true is set, read the response of the test message that sent. Default is false. Note: if performSendTest is false, this attribute will have no effect.
    readTestTimeout Specifies the timeout, in milliseconds, to use when performing a read test to the suspicious node. Default is 5000.
    removeSuspectsTimeout The maximum time(in seconds) for remove from removeSuspects. Member of removeSuspects will be automatically removed after removeSuspectsTimeout. If a negative value specified, the removeSuspects members never be removed until disappeared really. If the attribute is not provided, a default of 300 seconds (5 minutes) is used.

    org.apache.catalina.tribes.group.interceptors.TcpPingInterceptor Attributes

    Attribute Description
    interval If useThread == true, defines the interval of sending a ping message. default is 1000 ms.
    useThread Flag of whether to start a thread for sending a ping message. If set to true, this interceptor will start a local thread for sending a ping message. if set to false, channel heartbeat will send a ping message. default is false.

    org.apache.catalina.tribes.group.interceptors.ThroughputInterceptor Attributes

    Attribute Description
    interval Defines the interval in number of messages when we are to report the throughput statistics. The report is logged to the org.apache.juli.logging.LogFactory.getLog(ThroughputInterceptor.class) logger under the INFO level. Default value is to report every 10000 messages.

    Nested Components

    StaticMember Attributes

    LocalMember:
    Static member that is the local member of the static cluster group.

    Attribute Description
    className Only one implementation available:org.apache.catalina.tribes.membership.StaticMember
    port There is no need to set. The value of this attribute inherits from the cluster receiver setting.
    securePort There is no need to set. The value of this attribute inherits from the cluster receiver setting.
    host There is no need to set. The value of this attribute inherits from the cluster receiver setting.
    domain The logical cluster domain for that this static member listens for cluster messages. Two different type of values are possible:
    1. Regular string values like "staging-domain" or "tomcat-cluster" will be converted into bytes using ISO-8859-1 encoding. 2. byte array in string form, for example {216,123,12,3}
    uniqueId A universally uniqueId for this static member. The values must be 16 bytes in the following form:
    1. byte array in string form, for example {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}

    Member:
    Static member that add to the static cluster group.

    Attribute Description
    className Only one implementation available:org.apache.catalina.tribes.membership.StaticMember
    port The port that this static member listens to for cluster messages
    securePort The secure port this static member listens to for encrypted cluster messages default value is -1, this value means the member is not listening on a secure port
    host The host (or network interface) that this static member listens for cluster messages. Three different type of values are possible:
    1. IP address in the form of "216.123.1.23"
    2. Hostnames like "tomcat01.mydomain.com" or "tomcat01" as long as they resolve correctly
    3. byte array in string form, for example {216,123,12,3}
    domain The logical cluster domain for that this static member listens for cluster messages. Two different type of values are possible:
    1. Regular string values like "staging-domain" or "tomcat-cluster" will be converted into bytes using ISO-8859-1 encoding.
    2. byte array in string form, for example {216,123,12,3}
    uniqueId A universally uniqueId for this static member. The values must be 16 bytes in the following form:
    1. byte array in string form, for example {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}

    Comments

    Notice: This comments section collects your suggestions on improving documentation for Apache Tomcat.

    If you have trouble and need help, read Find Help page and ask your question on the tomcat-users 七乐彩开奖结果. Do not ask such questions here. This is not a Q&A section.

    The Apache Comments System is explained here. Comments may be removed by our moderators if they are either implemented or considered invalid/off-topic.

  • 市场能调节供需平衡吗? 2019-11-18
  • 体彩嘉年华公益进行时 走! 2019-11-07
  • 图解:有关端午节的这些冷知识 你知道吗 2019-11-06
  • 生姜祛寒止痛可缓解身体不适 但也要注意食用禁忌 2019-11-06
  • 南宁实现全国文明城市“四连冠” 2019-10-27
  • 泡沫建房开始在农村流行 20天可建成一栋别墅 ——凤凰网房产 2019-10-27
  • 在营造优质环境上下功夫 2019-10-10
  • 我们的人民日报,70年正青春 2019-10-09
  • 2017初秋流行色出炉,给家调调色吧 2019-10-06
  • 大同推出9条全域旅游线路直通车--旅游频道 2019-10-04
  • 山西省人大及其常委会各专门(工作)委员会分党组成立 2019-10-02
  • 湖南高校:将十九大精神融入基础课教学建设 2019-09-30
  • 关于新时代党内政治文化建设的九个观点 2019-09-22
  • 人民网日本株式会社报道集 2019-09-17
  • 候选企业:中国东方航空集团公司 2019-09-17
  • 博众彩票 cctv5 浙江体彩6+1 怎样开彩票店 腾讯分分彩官网平台 华东15选5分析专家 贵州快3开结果下载 足球比分直播手机网 十一运夺金技巧算法 福建36选7直播开奖 十一运夺金公式 体彩p3杀号 赛车345678规律 龙虎刷流水 吉林十一选五走势图跨度前三