Asynchronous cache batch write data can not be asynchronous execution

classic Classic list List threaded Threaded
3 messages Options
deleerhai deleerhai
Reply | Threaded
Open this post in threaded view
|

Asynchronous cache batch write data can not be asynchronous execution

Hi,
Why asynchronous cache batch write data can not be asynchronous, please help me.

1,Start a transaction, call the addAll method.


2,Gets an asynchronous cache and writes data to the cache.


3,Triggers the writeAll method of CacheStore, persistent storage.


4,Print execution process.The same thread execution, not asynchronous execution.


I want asynchronous execution of persistent storage, can you do it?
Please help me.Thank you very much!
vdpyatkov vdpyatkov
Reply | Threaded
Open this post in threaded view
|

Re: Asynchronous cache batch write data can not be asynchronous execution

Hello,

For asynchronous write to persistent storage you can to use Write-Behind flag (CacheConfiguration.setWriteBehindEnabled(boolean)).[1]
If you using write-through write will be directly after accure modification operation over cache.
Asynchronous cache not help for that case, it using for getting result through feature.[2]

[1]: https://apacheignite.readme.io/docs/persistent-store#write-behind-caching
[2]: https://apacheignite.readme.io/docs/async-support


deleerhai wrote
Hi,
Why asynchronous cache batch write data can not be asynchronous, please help me.

1,Start a transaction, call the addAll method.


2,Gets an asynchronous cache and writes data to the cache.


3,Triggers the writeAll method of CacheStore, persistent storage.


4,Print execution process.The same thread execution, not asynchronous execution.


I want asynchronous execution of persistent storage, can you do it?
Please help me.Thank you very much!
deleerhai deleerhai
Reply | Threaded
Open this post in threaded view
|

Re: Asynchronous cache batch write data can not be asynchronous execution

Hi,
Thank you very much!