Skip to content

Can near cache invalidation be made synchronous or is it always asynchronous? #70

Answered by aseovic
javafanboy asked this question in Q&A
Discussion options

You must be logged in to vote

This is an interesting one, and if you dig into the code you may get a wrong impression ;-)

NearCache uses SynchronousListener to receive invalidation events, which may lead you to believe that the invalidation is indeed synchronous. However, that's not the case -- all that means is that the events will be processed by the service thread that received them, instead of being queued up to be dispatched by the event dispatcher thread, as the events for regular MapListeners are. This ensures in order delivery of events for a given member, but it doesn't make the event notification itself truly "synchronous" across the cluster.

So to answer your question, no we don't support truly synchronous …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@javafanboy
Comment options

@javafanboy
Comment options

@aseovic
Comment options

Answer selected by javafanboy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants