18.2.2. Unscheduled Write-Behind Strategy Configuration (Remote Client-Server Mode)


To set the write-behind strategy in Red Hat JBoss Data Grid's Remote Client-Server mode, add the write-behind element to the target cache store configuration as follows:

Procedure 18.2. The write-behind Element

The write-behind element uses the following configuration parameters:
  1. The modification-queue-size Parameter

    The modification-queue-size parameter sets the modification queue size for the asynchronous store. If updates occur faster than the cache store can process the queue, the asynchronous store behaves like a synchronous store. The store behavior remains synchronous and blocks elements until the queue is able to accept them, after which the store behavior becomes asynchronous again.
    <file-store passivation="false" 
                path="${PATH}" 
                purge="true" 
                shared="false">
        <write-behind modification-queue-size="1024" />
    
  2. The shutdown-timeout Parameter

    The shutdown-timeout parameter specifies the time in milliseconds after which the cache store is shut down. When the store is stopped some modifications may still need to be applied. Setting a large timeout value will reduce the chance of data loss. The default value for this parameter is 25000.
    <file-store passivation="false" 
                path="${PATH}" 
                purge="true" 
                shared="false">
        <write-behind modification-queue-size="1024" 
                      shutdown-timeout="25000" />
    
  3. The flush-lock-timeout Parameter

    The flush-lock-timeout parameter specifies the time (in milliseconds) to acquire the lock that guards the state to be periodically flushed. The default value for this parameter is 15000.
    <file-store passivation="false" 
                path="${PATH}" 
                purge="true" 
                shared="false">
        <write-behind modification-queue-size="1024" 
                      shutdown-timeout="25000"  
                      flush-lock-timeout="15000" />
    
  4. The thread-pool-size Parameter

    The thread-pool-size parameter specifies the size of the thread pool. The threads in this thread pool apply modifications to the cache store. The default value for this parameter is 5.
    <file-store passivation="false" 
                path="${PATH}" 
                purge="true" 
                shared="false">
        <write-behind modification-queue-size="1024" 
                      shutdown-timeout="25000"  
                      flush-lock-timeout="15000" 
                      thread-pool-size="5" />
    </file-store>
    
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.