Source:
<code>public void onFilterResult(Object userContext, Object instance, Object eventType, Object[] projection, Comparable[] sortProjection) { DelegatingCacheEntryListenerInvocation<K, V>[] invocations; switch ((Event.Type) eventType) { case CACHE_ENTRY_ACTIVATED: invocations = activated_invocations; break; case CACHE_ENTRY_CREATED: invocations = created_invocations; break; case CACHE_ENTRY_INVALIDATED: invocations = invalidated_invocations; break; case CACHE_ENTRY_LOADED: invocations = loaded_invocations; break; case CACHE_ENTRY_MODIFIED: invocations = modified_invocations; break; case CACHE_ENTRY_PASSIVATED: invocations = passivated_invocations; break; case CACHE_ENTRY_REMOVED: invocations = removed_invocations; break; case CACHE_ENTRY_VISITED: invocations = visited_invocations; break; case CACHE_ENTRY_EVICTED: invocations = evicted_invocations; break; default: return; } if (invocations != null) { CacheEntryEvent<K, V> event = (CacheEntryEvent<K, V>) userContext; if (event.isPre() && isClustered || isPrimaryOnly && !clusteringDependentLogic.localNodeIsPrimaryOwner(event.getKey())) { return; } if (filterAndConvert && event instanceof EventImpl) { EventImpl<K, V> eventImpl = (EventImpl<K, V>) event; EventImpl<K, V> clone = eventImpl.clone(); clone.setValue((V) makeFilterResult(projection == null ? instance : null, projection, sortProjection)); event = clone; } for (DelegatingCacheEntryListenerInvocation<K, V> invocation : invocations) { <START> if (event.isPre() && invocation.getObservation() == Listener.Observation.POST) { <END> continue; } invocation.invokeNoChecks(event, false, filterAndConvert); } } }</code><technical_language>For completeness do want inverse? event is post observation is PRE</technical_language>

Target:
public void onFilterResult(Object userContext, Object instance, Object eventType, Object[] projection, Comparable[] sortProjection) { DelegatingCacheEntryListenerInvocation<K, V>[] invocations; switch ((Event.Type) eventType) { case CACHE_ENTRY_ACTIVATED: invocations = activated_invocations; break; case CACHE_ENTRY_CREATED: invocations = created_invocations; break; case CACHE_ENTRY_INVALIDATED: invocations = invalidated_invocations; break; case CACHE_ENTRY_LOADED: invocations = loaded_invocations; break; case CACHE_ENTRY_MODIFIED: invocations = modified_invocations; break; case CACHE_ENTRY_PASSIVATED: invocations = passivated_invocations; break; case CACHE_ENTRY_REMOVED: invocations = removed_invocations; break; case CACHE_ENTRY_VISITED: invocations = visited_invocations; break; case CACHE_ENTRY_EVICTED: invocations = evicted_invocations; break; case CACHE_ENTRY_EXPIRED: invocations = expired_invocations; break; default: return; } if (invocations != null) { CacheEntryEvent<K, V> event = (CacheEntryEvent<K, V>) userContext; if (event.isPre() && isClustered || isPrimaryOnly && !clusteringDependentLogic.localNodeIsPrimaryOwner(event.getKey())) { return; } if (filterAndConvert && event instanceof EventImpl) { EventImpl<K, V> eventImpl = (EventImpl<K, V>) event; EventImpl<K, V> clone = eventImpl.clone(); clone.setValue((V) makeFilterResult(projection == null ? instance : null, projection, sortProjection)); event = clone; } for (DelegatingCacheEntryListenerInvocation<K, V> invocation : invocations) { if (invocation.getObservation().shouldInvoke(event.isPre())) { invocation.invokeNoChecks(event, false, filterAndConvert); } } } }