org.jboss.cache.search
Class SearchableCoreListener

java.lang.Object
  extended by org.jboss.cache.search.SearchableCoreListener

public class SearchableCoreListener
extends Object

Author:
Navin Surtani (nsurtani@redhat.com) Listener class for changes made to the cache. This listener makes changes if it is a org.jboss.cache being used.

Constructor Summary
SearchableCoreListener(org.hibernate.search.engine.SearchFactoryImplementor searchFactory)
           
 
Method Summary
protected  void handleDeleteData(org.jboss.cache.notifications.event.NodeModifiedEvent event, org.hibernate.search.engine.SearchFactoryImplementor searchFactory)
          If the modification type is DELETE_DATA then this method will be called.
protected  void handlePutData(org.jboss.cache.notifications.event.NodeModifiedEvent event, org.hibernate.search.engine.SearchFactoryImplementor searchFactory)
          If the modification type is PUT_MAP or PUT_DATA then this method will be called.
 void updateLuceneIndexes(org.jboss.cache.notifications.event.NodeModifiedEvent event)
          Takes in a NodeModifiedEvent and updates the Lucene indexes using methods on the NodeModifiedEvent class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchableCoreListener

public SearchableCoreListener(org.hibernate.search.engine.SearchFactoryImplementor searchFactory)
Method Detail

updateLuceneIndexes

public void updateLuceneIndexes(org.jboss.cache.notifications.event.NodeModifiedEvent event)
                         throws InvalidKeyException
Takes in a NodeModifiedEvent and updates the Lucene indexes using methods on the NodeModifiedEvent class.

Parameters:
event - that has occured - or a node that has been changed. NodeModifiedEvent
Throws:
InvalidKeyException - if an invalid key is passed in.

handlePutData

protected void handlePutData(org.jboss.cache.notifications.event.NodeModifiedEvent event,
                             org.hibernate.search.engine.SearchFactoryImplementor searchFactory)
                      throws InvalidKeyException
If the modification type is PUT_MAP or PUT_DATA then this method will be called. Takes in the event as a parameter

Parameters:
event - that has occured - or a node that has been changed. NodeModifiedEvent
searchFactory - - a SearchFactoryImpl instance.
Throws:
InvalidKeyException

handleDeleteData

protected void handleDeleteData(org.jboss.cache.notifications.event.NodeModifiedEvent event,
                                org.hibernate.search.engine.SearchFactoryImplementor searchFactory)
                         throws InvalidKeyException
If the modification type is DELETE_DATA then this method will be called. Takes in the event as a parameter

Parameters:
event - that has occured - or a node that has been changed. NodeModifiedEvent
searchFactory - - a SearchFactoryImpl instance.
Throws:
InvalidKeyException


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