org.compass.needle.gigaspaces.service
Class CompassIndexEventListener

java.lang.Object
  extended by org.compass.needle.gigaspaces.service.CompassIndexEventListener
All Implemented Interfaces:
org.openspaces.events.SpaceDataEventListener

public class CompassIndexEventListener
extends Object
implements org.openspaces.events.SpaceDataEventListener

A space data event listener that should be registered with a notify container (probably with all its notify flag set: write, update, take, and lease expiration). Using the provided event it either index the given object (if it is a write or an update) or deletes it from the index (if it is a take or lease expiration).

The Compass instance is passed, probably configured to store the index on the Space it listens for notificaitons on in a collocated manner.

Note, batching should probably be used to increase indexing perfomance.

Author:
kimchy

Constructor Summary
CompassIndexEventListener(Compass compass)
           
 
Method Summary
 void onEvent(Object event, org.openspaces.core.GigaSpace gigaSpace, org.springframework.transaction.TransactionStatus transactionStatus, Object source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompassIndexEventListener

public CompassIndexEventListener(Compass compass)
Method Detail

onEvent

public void onEvent(Object event,
                    org.openspaces.core.GigaSpace gigaSpace,
                    org.springframework.transaction.TransactionStatus transactionStatus,
                    Object source)
Specified by:
onEvent in interface org.openspaces.events.SpaceDataEventListener


Copyright (c) 2004-2009 The Compass Project.