此内容没有您所选择的语言版本。
8.4. Configure Replication Mode (Library Mode)
The following procedure shows a replication mode configuration in Red Hat JBoss Data Grid's Library mode.
Procedure 8.2. Replication Mode Configuration
Set the Clustered Mode
Theclusteringelement'smodeparameter's value determines the clustering mode selected for the cache.<clustering mode="repl">
<clustering mode="repl">Copy to Clipboard Copied! Toggle word wrap Toggle overflow Specify the Remote Call Timeout
Thesyncelement'sreplTimeoutparameter specifies the maximum time period in milliseconds for an acknowledgment after a remote call. If the time period ends without any acknowledgment, an exception is thrown.<clustering mode="repl"> <sync replTimeout="${TIME}" /><clustering mode="repl"> <sync replTimeout="${TIME}" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define State Transfer Settings
ThestateTransferelement specifies how state is transferred when a node leaves or joins the cluster. It uses the following parameters:Specify State Transfer Batch Size
ThechunkSizeparameter specifies the size of cache entry state batches to be transferred. If this value is greater than0, the value set is the size of chunks sent. If the value is less than0, all states are transferred at the same time.<clustering mode="repl"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" /><clustering mode="repl"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set
fetchInMemoryStateParameterThefetchInMemoryStateparameter when set totrue, requests state information from neighboring caches on start up. This impacts the start up time for the cache.<clustering mode="repl"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" fetchInMemoryState="{true/false}" /><clustering mode="repl"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" fetchInMemoryState="{true/false}" />Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the
awaitInitialTransferParameterTheawaitInitialTransferparameter causes the first call to methodCacheManager.getCache()on the joiner node to block and wait until the joining is complete and the cache has finished receiving state from neighboring caches (iffetchInMemoryStateis enabled). This option applies to distributed and replicated caches only and is enabled by default.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
timeoutValueThetimeoutparameter specifies the maximum time (in milliseconds) the cache waits for responses from neighboring caches with the requested states. If no response is received within the thetimeoutperiod, the start up process aborts and an exception is thrown.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Specify Transport Configuration
Thetransportelement defines the transport configuration for the cache as follows:Specify the Cluster Name
TheclusterNameparameter specifies the name of the cluster. Nodes can only connect to clusters that share the same name.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
distributedSyncTimeoutValueThedistributedSyncTimeoutparameter specifies the time to wait to acquire a lock on the distributed lock. This distributed lock ensures that a single cache can transfer state or rehash state at a time.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Network Transport
ThetransportClassparameter specifies a class that represents a network transport for the cache.Copy to Clipboard Copied! Toggle word wrap Toggle overflow