Package org.infinispan.objectfilter.impl

Examples of org.infinispan.objectfilter.impl.FilterRegistry


      FilterParsingResult<TypeMetadata> parsingResult = queryParser.parseQuery(jpaQuery, createFilterProcessingChain(null)); //todo [anistor] query params not yet supported
      BooleanExpr normalizedFilter = booleanFilterNormalizer.normalize(parsingResult.getQuery());

      write.lock();
      try {
         FilterRegistry filterRegistry = filtersByType.get(parsingResult.getTargetEntityName());
         if (filterRegistry == null) {
            filterRegistry = createFilterRegistryForType(parsingResult.getTargetEntityMetadata());
            filtersByType.put(parsingResult.getTargetEntityName(), filterRegistry);
         }

         return filterRegistry.addFilter(normalizedFilter, parsingResult.getProjections(), callback);
      } finally {
         write.unlock();
      }
   }
View Full Code Here


   public void unregisterFilter(FilterSubscription filterSubscription) {
      FilterSubscriptionImpl filterSubscriptionImpl = (FilterSubscriptionImpl) filterSubscription;
      write.lock();
      try {
         FilterRegistry filterRegistry = filtersByType.get(filterSubscriptionImpl.getEntityTypeName());
         if (filterRegistry != null) {
            filterRegistry.removeFilter(filterSubscription);
         } else {
            throw new IllegalStateException("Reached illegal state");
         }
         if (filterRegistry.isEmpty()) {
            filtersByType.remove(filterRegistry.getTypeName());
         }
      } finally {
         write.unlock();
      }
   }
View Full Code Here

TOP

Related Classes of org.infinispan.objectfilter.impl.FilterRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.