Ce contenu n'est pas disponible dans la langue sélectionnée.
20.2. Write-Behind Caching
20.2.1. About Unscheduled Write-Behind Strategy Copier lienLien copié sur presse-papiers!
20.2.2. Unscheduled Write-Behind Strategy Configuration (Remote Client-Server Mode) Copier lienLien copié sur presse-papiers!
write-behind element to the target cache store configuration as follows:
Procedure 20.2. The write-behind Element
write-behind element uses the following configuration parameters:
The
modification-queue-sizeParameterThemodification-queue-sizeparameter 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" />The
shutdown-timeoutParameterTheshutdown-timeoutparameter 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 is25000.<file-store passivation="false" path="${PATH}" purge="true" shared="false"> <write-behind modification-queue-size="1024" shutdown-timeout="25000" />The
flush-lock-timeoutParameterTheflush-lock-timeoutparameter specifies the time (in milliseconds) to acquire the lock that guards the state to be periodically flushed. The default value for this parameter is15000.<file-store passivation="false" path="${PATH}" purge="true" shared="false"> <write-behind modification-queue-size="1024" shutdown-timeout="25000" flush-lock-timeout="15000" />The
thread-pool-sizeParameterThethread-pool-sizeparameter 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 is5.<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>
20.2.3. Unscheduled Write-Behind Strategy Configuration (Library Mode) Copier lienLien copié sur presse-papiers!
async element to the store configuration as follows:
Procedure 20.3. The async Element
async element uses the following configuration parameters:
- The
modificationQueueSizeparameter 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.<persistence> <fileStore location="${LOCATION}"> <async enabled="true" modificationQueueSize="1024" /> - The
shutdownTimeoutparameter specifies the time in milliseconds after which the cache store is shut down. This provides time for the asynchronous writer to flush data to the store when a cache is shut down. The default value for this parameter is25000.<persistence> <fileStore location="${LOCATION}"> <async enabled="true" modificationQueueSize="1024" shutdownTimeout="25000" /> - The
flushLockTimeoutparameter specifies the time (in milliseconds) to acquire the lock that guards the state to be periodically flushed. The default value for this parameter is15000.<persistence> <fileStore location="${LOCATION}"> <async enabled="true" modificationQueueSize="1024" shutdownTimeout="25000" flushLockTimeout="15000" /> - The
threadPoolSizeparameter specifies the number of threads that concurrently apply modifications to the store. The default value for this parameter is5.<persistence> <fileStore location="${LOCATION}"> <async enabled="true" modificationQueueSize="1024" shutdownTimeout="25000" flushLockTimeout="15000" threadPoolSize="5"/> </fileStore> </persistence>