Class QueryInterceptor

java.lang.Object
org.infinispan.interceptors.BaseAsyncInterceptor
org.infinispan.interceptors.DDAsyncInterceptor
org.infinispan.query.backend.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
     
    protected org.infinispan.persistence.manager.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

    Modifier and Type
    Method
    Description
    org.infinispan.util.concurrent.BlockingManager
     
    Deprecated, for removal: This API element is subject to removal in a future version.
    since 11
    boolean
     
    void
     
    void
    Remove all entries from all known indexes
    void
    purgeIndex(Class<?> entityType)
     
    protected void
     
    protected void
     
    visitClearCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.ClearCommand command)
     
    visitComputeCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.ComputeCommand command)
     
    visitComputeIfAbsentCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.ComputeIfAbsentCommand command)
     
    visitIracPutKeyValueCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.IracPutKeyValueCommand command)
     
    visitPutKeyValueCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.PutKeyValueCommand command)
     
    visitPutMapCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.PutMapCommand command)
     
    visitReadWriteKeyCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyCommand command)
     
    visitReadWriteKeyValueCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.ReadWriteKeyValueCommand command)
     
    visitReadWriteManyCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyCommand command)
     
    visitReadWriteManyEntriesCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.ReadWriteManyEntriesCommand command)
     
    visitRemoveCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.RemoveCommand command)
     
    visitReplaceCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.write.ReplaceCommand command)
     
    visitWriteOnlyKeyCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyCommand command)
     
    visitWriteOnlyKeyValueCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyKeyValueCommand command)
     
    visitWriteOnlyManyCommand(org.infinispan.context.InvocationContext ctx, org.infinispan.commands.functional.WriteOnlyManyCommand command)
     
    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 class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.infinispan.commands.Visitor

    visitRemoveExpiredCommand
  • Field Details

    • keyPartitioner

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

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

    • QueryInterceptor

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

    • 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)
    • indexedEntities

      @Deprecated(forRemoval=true, since="11.0") public Map<String,Class<?>> indexedEntities()
      Deprecated, for removal: This API element is subject to removal in a future version.
      since 11
      The indexed classes.
    • isStopping

      public boolean isStopping()