|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.wdssii.core.Index
public abstract class Index
the Index class connects to a data source and provides access to real-time products as they come in.
IndexRecord
Field Summary | |
---|---|
private HashSet<String> |
datatypes
|
private String |
indexLocation
|
private Set<IndexRecordListener> |
listeners
|
private HashMap<String,IndexRecord> |
records
|
private HashMap<String,HashSet<String>> |
selections
|
private HashMap<String,TreeMap<Date,IndexRecord>> |
timestamps
datatype to TreeMap |
Constructor Summary | |
---|---|
Index(String indexLocation,
Set<IndexRecordListener> listeners)
|
Method Summary | |
---|---|
(package private) void |
addRecByTypeTime(Date time,
String dt,
IndexRecord rec)
|
void |
addRecord(IndexRecord rec)
|
private void |
addRecord(String key,
IndexRecord rec)
|
void |
addRecordListener(IndexRecordListener listener)
Register a listener to be notified about new records in this index. |
private void |
addSelection(String key,
String s)
|
Set<String> |
getDataTypes()
|
IndexRecord |
getFirstRecordByTime(String dt)
|
String |
getIndexLocation()
the directory in which this index.xml or index.lb is located |
private String |
getKey(String[] sels,
int start,
int last)
|
IndexRecord |
getLastRecordByTime(String dt)
|
Set<String> |
getNextSelection(String key)
|
Set<String> |
getNextSelection(String[] selections)
|
IndexRecord |
getRecord(String key)
|
IndexRecord |
getRecord(String[] selections)
|
Map<Date,IndexRecord> |
getRecordsByTypeTime(String dt,
Date from,
Date to)
|
abstract Index |
newInstance(String path,
Set<IndexRecordListener> listeners)
Create a brand-new Index with these listeners attached. |
int |
numRecordsByTime(String dt)
|
abstract void |
update()
The update() method will be called periodically. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private HashMap<String,TreeMap<Date,IndexRecord>> timestamps
private HashMap<String,IndexRecord> records
private HashMap<String,HashSet<String>> selections
private HashSet<String> datatypes
private Set<IndexRecordListener> listeners
private String indexLocation
Constructor Detail |
---|
public Index(String indexLocation, Set<IndexRecordListener> listeners)
Method Detail |
---|
public abstract Index newInstance(String path, Set<IndexRecordListener> listeners) throws DataUnavailableException
DataUnavailableException
public abstract void update()
public String getIndexLocation()
public void addRecordListener(IndexRecordListener listener)
public void addRecord(IndexRecord rec)
void addRecByTypeTime(Date time, String dt, IndexRecord rec)
private String getKey(String[] sels, int start, int last)
public Map<Date,IndexRecord> getRecordsByTypeTime(String dt, Date from, Date to)
public IndexRecord getFirstRecordByTime(String dt)
public IndexRecord getLastRecordByTime(String dt)
public int numRecordsByTime(String dt)
private void addSelection(String key, String s)
private void addRecord(String key, IndexRecord rec)
public IndexRecord getRecord(String[] selections)
public IndexRecord getRecord(String key)
public Set<String> getDataTypes()
public Set<String> getNextSelection(String[] selections)
public Set<String> getNextSelection(String key)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |