Search in sources :

Example 1 with JCacheQueryLocalListener

use of org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.JCacheQueryLocalListener in project ignite by apache.

the class CacheContinuousQueryHandler method initLocalListener.

/**
 * Performs resource injection and checks asynchrony for the provided local listener.
 *
 * @param lsnr Local listener.
 * @param ctx Kernal context.
 * @throws IgniteCheckedException If failed to perform resource injection.
 */
private void initLocalListener(CacheEntryListener lsnr, GridKernalContext ctx) throws IgniteCheckedException {
    if (lsnr != null) {
        CacheEntryListener impl = lsnr instanceof JCacheQueryLocalListener ? ((JCacheQueryLocalListener) lsnr).impl : lsnr;
        ctx.resource().injectGeneric(impl);
        asyncCb = U.hasAnnotation(impl, IgniteAsyncCallback.class);
    }
}
Also used : CacheEntryListener(javax.cache.event.CacheEntryListener) IgniteAsyncCallback(org.apache.ignite.lang.IgniteAsyncCallback) JCacheQueryLocalListener(org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.JCacheQueryLocalListener)

Aggregations

CacheEntryListener (javax.cache.event.CacheEntryListener)1 JCacheQueryLocalListener (org.apache.ignite.internal.processors.cache.query.continuous.CacheContinuousQueryManager.JCacheQueryLocalListener)1 IgniteAsyncCallback (org.apache.ignite.lang.IgniteAsyncCallback)1