MapEventFilter Doesnot Filter For (Doc ID 1174456.1)

Last updated on MARCH 29, 2017

Applies to:

Oracle Coherence - Version: 3.5.3 and later   [Release: AS10g and later ]
Information in this document applies to any platform.

Symptoms

Using a MapEventFilter in C++ Client triggers events only during Insertion or Deletion:

Below is the sample C++ code:


void _tmain(int /*argc*/, _TCHAR* /*argv*/[])
{
     const std::string keyFilter = "test%";

     NamedCache::Handle cache = CacheFactory::getCache( CACHE_NAME );

     Filter::View filter;
     if ( !keyFilter.empty() )
        filter = LikeFilter::create( KeyExtractor::create(), keyFilter );

        std::cout << "Cache(" << CACHE_NAME << "): Listening..." << std::endl;
        VerboseMapListener::Handle listener = VerboseMapListener::create();

        Filter::Handle mapFilter = MapEventFilter::create( filter );
        cache->addFilterListener( listener, mapFilter, true );

        std::cout << "Press any key at any time to exit..." << std::endl;
        std::cin.ignore(0,'\n');
        _getch();

        cache->removeFilterListener( listener, mapFilter );
}

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms