9.3. Configure Invalidation Mode (Library Mode)
Procedure 9.2. Invalidation Mode Configuration
Set the Clustered Mode
Theclustering
element'smode
parameter's value determines the clustering mode selected for the cache.<clustering mode="invalidation">
<clustering mode="invalidation">
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Specify the Remote Call Timeout
Thesync
element'sreplTimeout
parameter 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="invalidation"> <sync replTimeout="${TIME}" />
<clustering mode="invalidation"> <sync replTimeout="${TIME}" />
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define State Transfer Settings
ThestateTransfer
element specifies how state is transferred when a node leaves or joins the cluster. It uses the following parameters:Specify State Transfer Batch Size
ThechunkSize
parameter 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="invalidation"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" />
<clustering mode="invalidation"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" />
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set
fetchInMemoryState
ParameterThefetchInMemoryState
parameter when set totrue
, requests state information from neighboring caches on start up. This impacts the start up time for the cache.<clustering mode="invalidation"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" fetchInMemoryState="{true/false}" />
<clustering mode="invalidation"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" fetchInMemoryState="{true/false}" />
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Define the
awaitInitialTransfer
ParameterTheawaitInitialTransfer
parameter 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 (iffetchInMemoryState
is enabled). This option applies to distributed and replicated caches only and is enabled by default.<clustering mode="invalidation"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" fetchInMemoryState="{true/false}" awaitInitialTransfer="{true/false}" />
<clustering mode="invalidation"> <sync replTimeout="${TIME}" /> <stateTransfer chunkSize="${SIZE}" fetchInMemoryState="{true/false}" awaitInitialTransfer="{true/false}" />
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set
timeout
ValueThetimeout
parameter 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 thetimeout
period, the start up process aborts and an exception is thrown.Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Specify Transport Configuration
Thetransport
element defines the transport configuration for the cache container as follows:Specify the Cluster Name
TheclusterName
parameter specifies the name of the cluster. Nodes can only connect to clusters that share the same name.<global> <transport clusterName="${NAME}" /> </global>
<global> <transport clusterName="${NAME}" /> </global>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the
distributedSyncTimeout
ValueThedistributedSyncTimeout
parameter 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.<global> <transport clusterName="${NAME}" distributedSyncTimeout="${TIME}" /> </global>
<global> <transport clusterName="${NAME}" distributedSyncTimeout="${TIME}" /> </global>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the Network Transport
ThetransportClass
parameter specifies a class that represents a network transport for the cache container.<global> <transport clusterName="${NAME}" distributedSyncTimeout="${TIME}" transportClass="${CLASS}" /> </global>
<global> <transport clusterName="${NAME}" distributedSyncTimeout="${TIME}" transportClass="${CLASS}" /> </global>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow