Class IndexerEvent

java.lang.Object
java.util.EventObject
gov.usgs.earthquake.indexer.IndexerEvent
All Implemented Interfaces:
Serializable

public class IndexerEvent extends EventObject
A description of a change to a ProductIndex. IndexerEvents are created by the Indexer, and sent to IndexerListeners.
See Also:
  • Constructor Details

    • IndexerEvent

      public IndexerEvent(Indexer source)
      Construct a new IndexerEvent.
      Parameters:
      source - the indexer that made the change.
  • Method Details

    • getIndexer

      public Indexer getIndexer()
      Returns:
      Indexer
    • getIndex

      public ProductIndex getIndex()
      Returns:
      Product Index
    • setIndex

      public void setIndex(ProductIndex index)
      Parameters:
      index - to set
    • getSummary

      public ProductSummary getSummary()
      Returns:
      product summary
    • setSummary

      public void setSummary(ProductSummary summary)
      Parameters:
      summary - to add
    • addIndexerChange

      public void addIndexerChange(IndexerChange change)
      Parameters:
      change - to add
    • addIndexerChanges

      public void addIndexerChanges(List<IndexerChange> changes)
      Parameters:
      changes - list of changes to add
    • getIndexerChanges

      public Vector<IndexerChange> getIndexerChanges()
      Returns:
      vector of Indexer Changes
    • getProduct

      public Product getProduct() throws Exception
      Convenience method to retrieve Product from Indexer storage.
      Returns:
      Product object corresponding to ProductSummary.
      Throws:
      Exception - if error occurs
    • getEvents

      public List<Event> getEvents()
      Retrieve a distinct list of events that were changed as part of this IndexerEvent.
      Returns:
      list of events