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.EventObject
A 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 void
addIndexerChange(IndexerChange change)
void
addIndexerChanges(java.util.List<IndexerChange> changes)
java.util.List<Event>
getEvents()
Retrieve a distinct list of events that were changed as part of this IndexerEvent.ProductIndex
getIndex()
Indexer
getIndexer()
java.util.Vector<IndexerChange>
getIndexerChanges()
Product
getProduct()
Convenience method to retrieve Product from Indexer storage.ProductSummary
getSummary()
void
setIndex(ProductIndex index)
void
setSummary(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
-
-