Ce contenu n'est pas disponible dans la langue sélectionnée.
12.3. The Memcached Interface Connector
- The
hotrod-connectorelement, which defines the configuration for a Hot Rod based connector. - The
memcached-connectorelement, which defines the configuration for a memcached based connector. - The
rest-connectorelement, which defines the configuration for a REST interface based connector.
<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.
memcached socket binding, and exposes the memcachedCache cache declared in the local container, using defaults for all other settings.
<memcached-connector socket-binding="memcached" cache-container="local"/>
12.3.1. Configure Memcached Connectors Copier lienLien copié sur presse-papiers!
connectors element in Red Hat JBoss Data Grid's Remote Client-Server Mode.
Procedure 12.1. Configuring the Memcached Connector in Remote Client-Server Mode
memcached-connector element defines the configuration elements for use with memcached.
The
socket-bindingParameterThesocket-bindingparameter specifies the socket binding port used by the memcached connector. This is a mandatory parameter.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <memcached-connector socket-binding="memcached" />The
cache-containerParameterThecache-containerparameter names the cache container used by the memcached connector. This is a mandatory parameter.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <memcached-connector socket-binding="memcached" cache-container="local" />The
worker-threadsParameterTheworker-threadsparameter specifies the number of worker threads available for the memcached connector. The default value for this parameter is 160. This is an optional parameter.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <memcached-connector socket-binding="memcached" cache-container="local" worker-threads="${VALUE}" />The
idle-timeoutParameterTheidle-timeoutparameter 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"> <memcached-connector socket-binding="memcached" cache-container="local" worker-threads="${VALUE}" idle-timeout="${VALUE}" />The
tcp-nodelayParameterThetcp-nodelayparameter specifies whether TCP packets will be delayed and sent out in batches. Valid values for this parameter aretrueandfalse. The default value for this parameter istrue. This is an optional parameter.<subsystem xmlns="urn:infinispan:server:endpoint:6.1"> <memcached-connector socket-binding="memcached" cache-container="local" worker-threads="${VALUE}" idle-timeout="{VALUE}" tcp-nodelay="{TRUE/FALSE}"/>The
send-buffer-sizeParameterThesend-buffer-sizeparameter indicates the size of the send buffer for the memcached 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"> <memcached-connector socket-binding="memcached" cache-container="local" worker-threads="${VALUE}" idle-timeout="{VALUE}" tcp-nodelay="{TRUE/FALSE}" send-buffer-size="{VALUE}" />The
receive-buffer-sizeParameterThereceive-buffer-sizeparameter indicates the size of the receive buffer for the memcached 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"> <memcached-connector socket-binding="memcached" cache-container="local" worker-threads="${VALUE}" idle-timeout="{VALUE}" tcp-nodelay="{TRUE/FALSE}" send-buffer-size="{VALUE}" receive-buffer-size="${VALUE}" /> </subsystem>