org.infinispan.query.backend
Class QueryInterceptor

java.lang.Object
  extended by org.infinispan.commands.AbstractVisitor
      extended by org.infinispan.interceptors.base.CommandInterceptor
          extended by org.infinispan.query.backend.QueryInterceptor
All Implemented Interfaces:
Visitor
Direct Known Subclasses:
LocalQueryInterceptor

public class QueryInterceptor
extends CommandInterceptor

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

Field Summary
protected  org.hibernate.search.engine.SearchFactoryImplementor searchFactory
           
protected  TransactionManager transactionManager
           
 
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
QueryInterceptor()
           
 
Method Summary
protected  void addToIndexes(Object value, Object key)
           
 void init(org.hibernate.search.engine.SearchFactoryImplementor searchFactory, TransactionManager transactionManager)
           
protected  void removeFromIndexes(Object value, Object key)
           
protected  boolean shouldModifyIndexes(InvocationContext ctx)
           
 Object visitClearCommand(InvocationContext ctx, ClearCommand command)
           
 Object visitPutKeyValueCommand(InvocationContext ctx, PutKeyValueCommand command)
           
 Object visitPutMapCommand(InvocationContext ctx, PutMapCommand command)
           
 Object visitRemoveCommand(InvocationContext ctx, RemoveCommand command)
           
 Object visitReplaceCommand(InvocationContext ctx, ReplaceCommand command)
           
 
Methods inherited from class org.infinispan.interceptors.base.CommandInterceptor
getNext, handleDefault, hasNext, invokeNextInterceptor, setNext
 
Methods inherited from class org.infinispan.commands.AbstractVisitor
visitCollection, visitCommitCommand, visitEntrySetCommand, visitEvictCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitValuesCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

searchFactory

protected org.hibernate.search.engine.SearchFactoryImplementor searchFactory

transactionManager

protected TransactionManager transactionManager
Constructor Detail

QueryInterceptor

public QueryInterceptor()
Method Detail

init

public void init(org.hibernate.search.engine.SearchFactoryImplementor searchFactory,
                 TransactionManager transactionManager)

shouldModifyIndexes

protected boolean shouldModifyIndexes(InvocationContext ctx)

visitPutKeyValueCommand

public Object visitPutKeyValueCommand(InvocationContext ctx,
                                      PutKeyValueCommand command)
                               throws Throwable
Specified by:
visitPutKeyValueCommand in interface Visitor
Overrides:
visitPutKeyValueCommand in class AbstractVisitor
Throws:
Throwable

visitRemoveCommand

public Object visitRemoveCommand(InvocationContext ctx,
                                 RemoveCommand command)
                          throws Throwable
Specified by:
visitRemoveCommand in interface Visitor
Overrides:
visitRemoveCommand in class AbstractVisitor
Throws:
Throwable

visitReplaceCommand

public Object visitReplaceCommand(InvocationContext ctx,
                                  ReplaceCommand command)
                           throws Throwable
Specified by:
visitReplaceCommand in interface Visitor
Overrides:
visitReplaceCommand in class AbstractVisitor
Throws:
Throwable

visitPutMapCommand

public Object visitPutMapCommand(InvocationContext ctx,
                                 PutMapCommand command)
                          throws Throwable
Specified by:
visitPutMapCommand in interface Visitor
Overrides:
visitPutMapCommand in class AbstractVisitor
Throws:
Throwable

visitClearCommand

public Object visitClearCommand(InvocationContext ctx,
                                ClearCommand command)
                         throws Throwable
Specified by:
visitClearCommand in interface Visitor
Overrides:
visitClearCommand in class AbstractVisitor
Throws:
Throwable

addToIndexes

protected void addToIndexes(Object value,
                            Object key)

removeFromIndexes

protected void removeFromIndexes(Object value,
                                 Object key)

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.