이 콘텐츠는 선택한 언어로 제공되지 않습니다.

13.4. The Hot Rod Interface Connector


Red Hat JBoss Data Grid supports three connector types, namely:
  • The hotrod-connector element, which defines the configuration for a Hot Rod based connector.
  • The memcached-connector element, which defines the configuration for a memcached based connector.
  • The rest-connector element, which defines the configuration for a REST interface based connector.
The connector declaration enables a Hot Rod, Memcached, or REST server using a socket binding, which is declared within a <socket-binding-group />, and exposing the caches declared in the local container, using defaults for all other settings. The following examples show how to connect to Hot Rod, Memcached, and REST servers.
The following enables a Hot Rod server using the hotrod socket binding.
<hotrod-connector socket-binding="hotrod" cache-container="local" />
Copy to Clipboard Toggle word wrap
The connector creates a supporting topology cache with default settings. These settings can be tuned by adding the <topology-state-transfer /> child element to the connector as follows:
<hotrod-connector socket-binding="hotrod" cache-container="local">
   <topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000" />
</hotrod-connector>
Copy to Clipboard Toggle word wrap
The Hot Rod connector can be tuned with additional settings. See Section 13.4.1, “Configure Hot Rod Connectors” for more information on how to configure the Hot Rod connector.

Note

The Hot Rod connector can be secured using SSL. See the Hot Rod Authentication Using SASL section of the Developer Guide for more information.

13.4.1. Configure Hot Rod Connectors

The following procedure describes the attributes used to configure the Hot Rod connector in Red Hat JBoss Data Grid's Remote Client-Server Mode. Both the hotrod-connector and topology-state-transfer elements must be configured based on the following procedure.

Procedure 13.1. Configuring Hot Rod Connectors for Remote Client-Server Mode

  1. The hotrod-connector Element

    The hotrod-connector element defines the configuration elements for use with Hot Rod.
    1. The socket-binding Parameter

      The socket-binding parameter specifies the socket binding port used by the Hot Rod connector. This is a mandatory parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod" />
      Copy to Clipboard Toggle word wrap
    2. The cache-container Parameter

      The cache-container parameter names the cache container used by the Hot Rod connector. This is a mandatory parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" />
      Copy to Clipboard Toggle word wrap
    3. The worker-threads Parameter

      The worker-threads parameter specifies the number of worker threads available for the Hot Rod connector. The default value for this parameter is 160. This is an optional parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" 
                              worker-threads="${VALUE}" />
      Copy to Clipboard Toggle word wrap
    4. The idle-timeout Parameter

      The idle-timeout parameter specifies the time (in milliseconds) the connector can remain idle before the connection times out. The default value for this parameter is -1, which means that no timeout period is set. This is an optional parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" 
                              worker-threads="${VALUE}" 
                              idle-timeout="${VALUE}"/>
      Copy to Clipboard Toggle word wrap
    5. The tcp-nodelay Parameter

      The tcp-nodelay parameter specifies whether TCP packets will be delayed and sent out in batches. Valid values for this parameter are true and false. The default value for this parameter is true. This is an optional parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" 
                              worker-threads="${VALUE}" 
                              idle-timeout="${VALUE}"
                              tcp-nodelay="${TRUE/FALSE}" />
      Copy to Clipboard Toggle word wrap
    6. The send-buffer-size Parameter

      The send-buffer-size parameter indicates the size of the send buffer for the Hot Rod connector. The default value for this parameter is the size of the TCP stack buffer. This is an optional parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" 
                              worker-threads="${VALUE}" 
                              idle-timeout="${VALUE}"
                              tcp-nodelay="${TRUE/FALSE}" 
                              send-buffer-size="${VALUE}"/>
      Copy to Clipboard Toggle word wrap
    7. The receive-buffer-size Parameter

      The receive-buffer-size parameter indicates the size of the receive buffer for the Hot Rod connector. The default value for this parameter is the size of the TCP stack buffer. This is an optional parameter.
      subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" 
                              worker-threads="${VALUE}" 
                              idle-timeout="${VALUE}"
                              tcp-nodelay="${TRUE/FALSE}" 
                              send-buffer-size="${VALUE}"
                              receive-buffer-size="${VALUE}"   />
      Copy to Clipboard Toggle word wrap
  2. The topology-state-transfer Element

    The topology-state-transfer element specifies the topology state transfer configurations for the Hot Rod connector. This element can only occur once within a hotrod-connector element.
    1. The lock-timeout Parameter

      The lock-timeout parameter specifies the time (in milliseconds) after which the operation attempting to obtain a lock times out. The default value for this parameter is 10 seconds. This is an optional parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" 
                              worker-threads="${VALUE}" 
                              idle-timeout="${VALUE}"
                              tcp-nodelay="${TRUE/FALSE}" 
                              send-buffer-size="${VALUE}"
                              receive-buffer-size="${VALUE}"   />
            <topology-state-transfer lock-timeout"="${MILLISECONDS}" />
      Copy to Clipboard Toggle word wrap
    2. The replication-timeout Parameter

      The replication-timeout parameter specifies the time (in milliseconds) after which the replication operation times out. The default value for this parameter is 10 seconds. This is an optional parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" 
                              worker-threads="${VALUE}" 
                              idle-timeout="${VALUE}"
                              tcp-nodelay="${TRUE/FALSE}" 
                              send-buffer-size="${VALUE}"
                              receive-buffer-size="${VALUE}"   />
            <topology-state-transfer lock-timeout"="${MILLISECONDS}" 
                                     replication-timeout="${MILLISECONDS}" />
      Copy to Clipboard Toggle word wrap
    3. The external-host Parameter

      The external-host parameter specifies the hostname sent by the Hot Rod server to clients listed in the topology information. The default value for this parameter is the host address. This is an optional parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" 
                              worker-threads="${VALUE}" 
                              idle-timeout="${VALUE}"
                              tcp-nodelay="${TRUE/FALSE}" 
                              send-buffer-size="${VALUE}"
                              receive-buffer-size="${VALUE}"   />
            <topology-state-transfer lock-timeout"="${MILLISECONDS}" 
                                     replication-timeout="${MILLISECONDS}" 
                                     external-host="${HOSTNAME}" />
      Copy to Clipboard Toggle word wrap
    4. The external-port Parameter

      The external-port parameter specifies the port sent by the Hot Rod server to clients listed in the topology information. The default value for this parameter is the configured port. This is an optional parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
            <hotrod-connector socket-binding="hotrod"
                              cache-container="local" 
                              worker-threads="${VALUE}" 
                              idle-timeout="${VALUE}"
                              tcp-nodelay="${TRUE/FALSE}" 
                              send-buffer-size="${VALUE}"
                              receive-buffer-size="${VALUE}"   />
            <topology-state-transfer lock-timeout"="${MILLISECONDS}" 
                                     replication-timeout="${MILLISECONDS}" 
                                     external-host="${HOSTNAME}" 
                                     external-port="${PORT}" />
      Copy to Clipboard Toggle word wrap
    5. The lazy-retrieval Parameter

      The lazy-retrieval parameter indicates whether the Hot Rod connector will carry out retrieval operations lazily. The default value for this parameter is true. This is an optional parameter.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
      	<hotrod-connector socket-binding="hotrod" 
      			  cache-container="local" 
      			  worker-threads="${VALUE}" 
      			  idle-timeout="${VALUE}"
      			  tcp-nodelay="${TRUE/FALSE}"
      			  send-buffer-size="${VALUE}"
      			  receive-buffer-size="${VALUE}" />
      	<topology-state-transfer lock-timeout"="${MILLISECONDS}"
      				 replication-timeout="${MILLISECONDS}"
      				 external-host="${HOSTNAME}"
      				 external-port="${PORT}"
      				 lazy-retrieval="${TRUE/FALSE}" /> 
      </subsystem>
      Copy to Clipboard Toggle word wrap
    6. The await-initial-transfer Parameter

      The await-initial-transfer parameter specifies whether the initial state retrieval happens immediately at startup. This parameter only applies when lazy-retrieval is set to false. This default value for this parameter is true.
      <subsystem xmlns="urn:infinispan:server:endpoint:6.1">
      	<hotrod-connector socket-binding="hotrod" 
      			  cache-container="local" 
      			  worker-threads="${VALUE}" 
      			  idle-timeout="${VALUE}"
      			  tcp-nodelay="${TRUE/FALSE}"
      			  send-buffer-size="${VALUE}"
      			  receive-buffer-size="${VALUE}" />
      	<topology-state-transfer lock-timeout"="${MILLISECONDS}"
      				 replication-timeout="${MILLISECONDS}"
      				 external-host="${HOSTNAME}"
      				 external-port="${PORT}"
      				 lazy-retrieval="${TRUE/FALSE}" 
      				 await-initial-transfer="${TRUE/FALSE}" /> 
      </subsystem>
      Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat