Interface FilterIndexingServiceProvider
public interface FilterIndexingServiceProvider
A service provider for filter indexing services. This is supposed to perform the filtering operation in a more
efficient way than directly executing the filter by calling the
CacheEventFilterConverter.filterAndConvert(Object, Object, Metadata, Object, Metadata, EventType)
method. Implementations are discovered via the ServiceLoader
or ServiceFinder
mechanism. Implementations may have
their dependencies injected using the Inject
annotation.- Since:
- 7.2
- Author:
- anistor@redhat.com
-
Method Summary
Modifier and TypeMethodDescription<K,
V> DelegatingCacheEntryListenerInvocation <K, V> interceptListenerInvocation
(CacheEntryListenerInvocation<K, V> invocation) Starts handling an invocation that uses anIndexedFilter
.<K,
V> void registerListenerInvocations
(boolean isClustered, boolean isPrimaryOnly, boolean filterAndConvert, IndexedFilter<?, ?, ?> indexedFilter, Map<Class<? extends Annotation>, List<DelegatingCacheEntryListenerInvocation<K, V>>> listeners, DataConversion keyDataConversion, DataConversion valueDataConversion) void
start()
Start the provider.void
stop()
Stop the provider.boolean
supportsFilter
(IndexedFilter<?, ?, ?> indexedFilter) Reports whether this provider supports the given filter type.
-
Method Details
-
start
void start()Start the provider. This is called after the dependencies are injected. -
supportsFilter
Reports whether this provider supports the given filter type.- Parameters:
indexedFilter
- an indexable filter- Returns:
true
if the filter is supported,false
otherwise
-
interceptListenerInvocation
<K,V> DelegatingCacheEntryListenerInvocation<K,V> interceptListenerInvocation(CacheEntryListenerInvocation<K, V> invocation) Starts handling an invocation that uses anIndexedFilter
.- Type Parameters:
K
- cache key typeV
- cache value type- Parameters:
invocation
- the invocation to handle- Returns:
- the wrapped invocation
-
registerListenerInvocations
<K,V> void registerListenerInvocations(boolean isClustered, boolean isPrimaryOnly, boolean filterAndConvert, IndexedFilter<?, ?, ?> indexedFilter, Map<Class<? extends Annotation>, List<DelegatingCacheEntryListenerInvocation<K, V>>> listeners, DataConversion keyDataConversion, DataConversion valueDataConversion) -
stop
void stop()Stop the provider.
-