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, Sanne Grinovero (C) 2011 Red Hat Inc.

Field Summary
protected  TransactionManager transactionManager
           
protected  TransactionSynchronizationRegistry transactionSynchronizationRegistry
           
 
Fields inherited from class org.infinispan.interceptors.base.CommandInterceptor
configuration, log, trace
 
Constructor Summary
QueryInterceptor(org.hibernate.search.spi.SearchFactoryIntegrator searchFactory)
           
 
Method Summary
protected  void addToIndexes(Object value, Object key)
           
 void enableClasses(Class<?>[] classes)
           
 void init(TransactionManager transactionManager, TransactionSynchronizationRegistry transactionSynchronizationRegistry)
           
protected  void removeFromIndexes(Object value, Object key)
           
protected  boolean shouldModifyIndexes(InvocationContext ctx)
           
protected  void updateIndexes(Object value, Object key)
           
 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, visitDistributedExecuteCommand, visitEntrySetCommand, visitEvictCommand, visitGetKeyValueCommand, visitInvalidateCommand, visitInvalidateL1Command, visitKeySetCommand, visitLockControlCommand, visitPrepareCommand, visitRollbackCommand, visitSizeCommand, visitUnknownCommand, visitValuesCommand
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactionManager

protected TransactionManager transactionManager

transactionSynchronizationRegistry

protected TransactionSynchronizationRegistry transactionSynchronizationRegistry
Constructor Detail

QueryInterceptor

public QueryInterceptor(org.hibernate.search.spi.SearchFactoryIntegrator searchFactory)
Method Detail

init

public void init(TransactionManager transactionManager,
                 TransactionSynchronizationRegistry transactionSynchronizationRegistry)

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)

updateIndexes

protected void updateIndexes(Object value,
                             Object key)

enableClasses

public void enableClasses(Class<?>[] classes)

-->

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