com.atlassian.confluence.cache.hazelcast
Class DefaultAsyncEntryListenerGenerator
java.lang.Object
com.atlassian.confluence.cache.hazelcast.DefaultAsyncEntryListenerGenerator
- All Implemented Interfaces:
- AsyncEntryListenerGenerator, org.springframework.beans.factory.DisposableBean
@Internal
public class DefaultAsyncEntryListenerGenerator
- extends java.lang.Object
- implements AsyncEntryListenerGenerator, org.springframework.beans.factory.DisposableBean
Implementation of AsyncEntryListenerGenerator
that
uses the supplied ExecutorService
. Has the optimisation that if the
event is for the current node, then the event is forwarded on to the delegate directly, without using
a separate thread. The reasons are:
- Optimise performance
- The calling thread is not a Hazelcast network handler, and hence it can be delayed.
- Since:
- 5.6
Method Summary |
void |
destroy()
|
<K,V> com.hazelcast.core.EntryListener<K,V> |
|
generate(com.hazelcast.core.EntryListener<K,V> delegate)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultAsyncEntryListenerGenerator
public DefaultAsyncEntryListenerGenerator(java.util.concurrent.ExecutorService executorService)
destroy
public void destroy()
- Specified by:
destroy
in interface org.springframework.beans.factory.DisposableBean
generate
@Nonnull
public <K,V> com.hazelcast.core.EntryListener<K,V> generate(com.hazelcast.core.EntryListener<K,V> delegate)
- Specified by:
generate
in interface AsyncEntryListenerGenerator
Copyright © 2003-2014 Atlassian. All Rights Reserved.