Class QueryInterceptor

  • All Implemented Interfaces:
    org.infinispan.commands.Visitor, org.infinispan.interceptors.AsyncInterceptor

    public final class QueryInterceptor
    extends org.infinispan.interceptors.DDAsyncInterceptor
    This interceptor will be created when the System Property "infinispan.query.indexLocalOnly" is "false"

    This type of interceptor will allow the indexing of data even when it comes from other caches within a cluster.

    However, if the a cache would not be putting the data locally, the interceptor will not index it.

    Since:
    4.0
    Author:
    Navin Surtani, Sanne Grinovero <sanne@hibernate.org> (C) 2011 Red Hat Inc., Marko Luksa, anistor@redhat.com
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.infinispan.distribution.ch.KeyPartitioner keyPartitioner  
      protected org.infinispan.persistence.manager.PersistenceManager persistenceManager  
      • Fields inherited from class org.infinispan.interceptors.BaseAsyncInterceptor

        cacheConfiguration
    • Constructor Summary

      Constructors 
      Constructor Description
      QueryInterceptor​(boolean isManualIndexing, ConcurrentMap<org.infinispan.transaction.xa.GlobalTransaction,​Map<Object,​Object>> txOldValues, org.infinispan.AdvancedCache<?,​?> cache, Map<String,​Class<?>> indexedClasses)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      org.infinispan.util.concurrent.BlockingManager getBlockingManager()  
      Map<String,​Class<?>> indexedEntities()
      Deprecated.
      since 11
      boolean isStopping()  
      void prepareForStopping()  
      void purgeAllIndexes()
      Remove all entries from all known indexes
      void purgeIndex​(Class<?> entityType)  
      protected void start()  
      protected void stop()  
      Object visitClearCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)  
      Object visitComputeCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command)  
      Object visitComputeIfAbsentCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command)  
      Object visitIracPutKeyValueCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.IracPutKeyValueCommand command)  
      Object visitPutKeyValueCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)  
      Object visitPutMapCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)  
      Object visitReadWriteKeyCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyCommand command)  
      Object visitReadWriteKeyValueCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyValueCommand command)  
      Object visitReadWriteManyCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyCommand command)  
      Object visitReadWriteManyEntriesCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyEntriesCommand command)  
      Object visitRemoveCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)  
      Object visitReplaceCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)  
      Object visitWriteOnlyKeyCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyCommand command)  
      Object visitWriteOnlyKeyValueCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyValueCommand command)  
      Object visitWriteOnlyManyCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyCommand command)  
      Object visitWriteOnlyManyEntriesCommand​(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyEntriesCommand command)  
      • Methods inherited from class org.infinispan.interceptors.DDAsyncInterceptor

        handleDefault, visitCommand, visitCommitCommand, visitEntrySetCommand, visitEvictCommand, visitGetAllCommand, visitGetCacheEntryCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitReadOnlyKeyCommand, visitReadOnlyManyCommand, visitRollbackCommand, visitSizeCommand, visitTouchCommand, visitUnknownCommand
      • Methods inherited from class org.infinispan.interceptors.BaseAsyncInterceptor

        asyncInvokeNext, asyncInvokeNext, asyncInvokeNext, asyncValue, delayedNull, delayedValue, delayedValue, invokeNext, invokeNextAndExceptionally, invokeNextAndFinally, invokeNextAndHandle, invokeNextThenAccept, invokeNextThenApply, isSuccessfullyDone, makeStage, setNextInterceptor, valueOrException
      • Methods inherited from interface org.infinispan.commands.Visitor

        visitRemoveExpiredCommand
    • Field Detail

      • keyPartitioner

        protected org.infinispan.distribution.ch.KeyPartitioner keyPartitioner
      • persistenceManager

        protected org.infinispan.persistence.manager.PersistenceManager persistenceManager
    • Constructor Detail

      • QueryInterceptor

        public QueryInterceptor​(boolean isManualIndexing,
                                ConcurrentMap<org.infinispan.transaction.xa.GlobalTransaction,​Map<Object,​Object>> txOldValues,
                                org.infinispan.AdvancedCache<?,​?> cache,
                                Map<String,​Class<?>> indexedClasses)
    • Method Detail

      • start

        protected void start()
      • stop

        protected void stop()
      • prepareForStopping

        public void prepareForStopping()
      • getBlockingManager

        public org.infinispan.util.concurrent.BlockingManager getBlockingManager()
      • visitPutKeyValueCommand

        public Object visitPutKeyValueCommand​(org.infinispan.context.InvocationContext ctx,
                                              org.infinispan.commands.write.PutKeyValueCommand command)
        Specified by:
        visitPutKeyValueCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitPutKeyValueCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitIracPutKeyValueCommand

        public Object visitIracPutKeyValueCommand​(org.infinispan.context.InvocationContext ctx,
                                                  org.infinispan.commands.write.IracPutKeyValueCommand command)
        Specified by:
        visitIracPutKeyValueCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitIracPutKeyValueCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitRemoveCommand

        public Object visitRemoveCommand​(org.infinispan.context.InvocationContext ctx,
                                         org.infinispan.commands.write.RemoveCommand command)
        Specified by:
        visitRemoveCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitRemoveCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitReplaceCommand

        public Object visitReplaceCommand​(org.infinispan.context.InvocationContext ctx,
                                          org.infinispan.commands.write.ReplaceCommand command)
        Specified by:
        visitReplaceCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitReplaceCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitComputeCommand

        public Object visitComputeCommand​(org.infinispan.context.InvocationContext ctx,
                                          org.infinispan.commands.write.ComputeCommand command)
        Specified by:
        visitComputeCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitComputeCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitComputeIfAbsentCommand

        public Object visitComputeIfAbsentCommand​(org.infinispan.context.InvocationContext ctx,
                                                  org.infinispan.commands.write.ComputeIfAbsentCommand command)
        Specified by:
        visitComputeIfAbsentCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitComputeIfAbsentCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitPutMapCommand

        public Object visitPutMapCommand​(org.infinispan.context.InvocationContext ctx,
                                         org.infinispan.commands.write.PutMapCommand command)
        Specified by:
        visitPutMapCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitPutMapCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitClearCommand

        public Object visitClearCommand​(org.infinispan.context.InvocationContext ctx,
                                        org.infinispan.commands.write.ClearCommand command)
        Specified by:
        visitClearCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitClearCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitReadWriteKeyCommand

        public Object visitReadWriteKeyCommand​(org.infinispan.context.InvocationContext ctx,
                                               org.infinispan.commands.functional.ReadWriteKeyCommand command)
        Specified by:
        visitReadWriteKeyCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitReadWriteKeyCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitWriteOnlyKeyCommand

        public Object visitWriteOnlyKeyCommand​(org.infinispan.context.InvocationContext ctx,
                                               org.infinispan.commands.functional.WriteOnlyKeyCommand command)
        Specified by:
        visitWriteOnlyKeyCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitWriteOnlyKeyCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitReadWriteKeyValueCommand

        public Object visitReadWriteKeyValueCommand​(org.infinispan.context.InvocationContext ctx,
                                                    org.infinispan.commands.functional.ReadWriteKeyValueCommand command)
        Specified by:
        visitReadWriteKeyValueCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitReadWriteKeyValueCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitWriteOnlyManyEntriesCommand

        public Object visitWriteOnlyManyEntriesCommand​(org.infinispan.context.InvocationContext ctx,
                                                       org.infinispan.commands.functional.WriteOnlyManyEntriesCommand command)
        Specified by:
        visitWriteOnlyManyEntriesCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitWriteOnlyManyEntriesCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitWriteOnlyKeyValueCommand

        public Object visitWriteOnlyKeyValueCommand​(org.infinispan.context.InvocationContext ctx,
                                                    org.infinispan.commands.functional.WriteOnlyKeyValueCommand command)
        Specified by:
        visitWriteOnlyKeyValueCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitWriteOnlyKeyValueCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitWriteOnlyManyCommand

        public Object visitWriteOnlyManyCommand​(org.infinispan.context.InvocationContext ctx,
                                                org.infinispan.commands.functional.WriteOnlyManyCommand command)
        Specified by:
        visitWriteOnlyManyCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitWriteOnlyManyCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitReadWriteManyCommand

        public Object visitReadWriteManyCommand​(org.infinispan.context.InvocationContext ctx,
                                                org.infinispan.commands.functional.ReadWriteManyCommand command)
        Specified by:
        visitReadWriteManyCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitReadWriteManyCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • visitReadWriteManyEntriesCommand

        public Object visitReadWriteManyEntriesCommand​(org.infinispan.context.InvocationContext ctx,
                                                       org.infinispan.commands.functional.ReadWriteManyEntriesCommand command)
        Specified by:
        visitReadWriteManyEntriesCommand in interface org.infinispan.commands.Visitor
        Overrides:
        visitReadWriteManyEntriesCommand in class org.infinispan.interceptors.DDAsyncInterceptor
      • purgeAllIndexes

        public void purgeAllIndexes()
        Remove all entries from all known indexes
      • purgeIndex

        public void purgeIndex​(Class<?> entityType)
      • isStopping

        public boolean isStopping()