Package gov.usgs.earthquake.indexer
Class IndexerEvent
- java.lang.Object
-
- java.util.EventObject
-
- gov.usgs.earthquake.indexer.IndexerEvent
-
- All Implemented Interfaces:
java.io.Serializable
public class IndexerEvent extends java.util.EventObjectA description of a change to a ProductIndex. IndexerEvents are created by the Indexer, and sent to IndexerListeners.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description IndexerEvent(Indexer source)Construct a new IndexerEvent.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIndexerChange(IndexerChange change)voidaddIndexerChanges(java.util.List<IndexerChange> changes)java.util.List<Event>getEvents()Retrieve a distinct list of events that were changed as part of this IndexerEvent.ProductIndexgetIndex()IndexergetIndexer()java.util.Vector<IndexerChange>getIndexerChanges()ProductgetProduct()Convenience method to retrieve Product from Indexer storage.ProductSummarygetSummary()voidsetIndex(ProductIndex index)voidsetSummary(ProductSummary summary)
-
-
-
Constructor Detail
-
IndexerEvent
public IndexerEvent(Indexer source)
Construct a new IndexerEvent.- Parameters:
source- the indexer that made the change.
-
-
Method Detail
-
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(java.util.List<IndexerChange> changes)
- Parameters:
changes- list of changes to add
-
getIndexerChanges
public java.util.Vector<IndexerChange> getIndexerChanges()
- Returns:
- vector of Indexer Changes
-
getProduct
public Product getProduct() throws java.lang.Exception
Convenience method to retrieve Product from Indexer storage.- Returns:
- Product object corresponding to ProductSummary.
- Throws:
java.lang.Exception- if error occurs
-
getEvents
public java.util.List<Event> getEvents()
Retrieve a distinct list of events that were changed as part of this IndexerEvent.- Returns:
- list of events
-
-