Package edu.sc.seis.sod.source.event
Class AbstractEventSource
java.lang.Object
edu.sc.seis.sod.source.AbstractSource
edu.sc.seis.sod.source.event.AbstractEventSource
- All Implemented Interfaces:
EventSource
,Source
- Direct Known Subclasses:
DelayedEventSource
,FdsnEvent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
static final String
static final String
static final String
protected boolean
protected edu.iris.Fissures.model.TimeInterval
protected edu.iris.Fissures.model.TimeInterval
protected edu.iris.Fissures.model.MicroSecondDate
static final edu.iris.Fissures.model.TimeInterval
protected edu.iris.Fissures.model.TimeInterval
static final String
protected edu.iris.Fissures.model.TimeInterval
protected edu.iris.Fissures.model.MicroSecondDate
Fields inherited from class edu.sc.seis.sod.source.AbstractSource
name, NAME_ELEMENT, RETRIES_ELEMENT
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractEventSource
(String name, int retries) AbstractEventSource
(Element config, String defaultName) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
void
decrease the time increment for queries, but only if it is larger than the minimum = 1Day to avoid many tiny queries to the server.edu.iris.Fissures.model.TimeInterval
edu.iris.Fissures.model.TimeInterval
getLag()
protected edu.iris.Fissures.model.MicroSecondDate
protected edu.iris.Fissures.model.MicroSecondDate
protected edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange
edu.iris.Fissures.model.TimeInterval
edu.iris.Fissures.model.MicroSecondDate
edu.iris.Fissures.model.TimeInterval
If the source needs to wait for more events to arrive, it should return the amount of time it wants to wait with this method.void
protected boolean
protected edu.iris.Fissures.model.MicroSecondDate
Scoots the query time back by the event lag amount from the run properties to the query start time at the earliestvoid
setIncrement
(edu.iris.Fissures.model.TimeInterval increment) void
setLag
(edu.iris.Fissures.model.TimeInterval lag) protected void
setQueryEdge
(edu.iris.Fissures.model.MicroSecondDate edge) sets the latest time queriedprotected void
updateQueryEdge
(edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange queryTime) Methods inherited from class edu.sc.seis.sod.source.AbstractSource
appendToName, getFissuresNamingService, getName, getRetries, getRetryStrategy, setRetryStrategy
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.sc.seis.sod.source.event.EventSource
getDescription, getEventTimeRange, hasNext, next
Methods inherited from interface edu.sc.seis.sod.source.Source
appendToName, getName, getRetries
-
Field Details
-
caughtUpToRealtime
protected boolean caughtUpToRealtime -
everCaughtUpToRealtime
protected boolean everCaughtUpToRealtime -
lastQueryTime
protected edu.iris.Fissures.model.MicroSecondDate lastQueryTime -
NO_DNS
- See Also:
-
sleepUntilTime
protected edu.iris.Fissures.model.MicroSecondDate sleepUntilTime -
increment
protected edu.iris.Fissures.model.TimeInterval increment -
lag
protected edu.iris.Fissures.model.TimeInterval lag -
refreshInterval
protected edu.iris.Fissures.model.TimeInterval refreshInterval -
nearRealTimeInterval
protected edu.iris.Fissures.model.TimeInterval nearRealTimeInterval -
EVENT_QUERY_INCREMENT
- See Also:
-
EVENT_REFRESH_INTERVAL
- See Also:
-
EVENT_LAG
- See Also:
-
MIN_INCREMENT
public static final edu.iris.Fissures.model.TimeInterval MIN_INCREMENT
-
-
Constructor Details
-
AbstractEventSource
-
AbstractEventSource
- Throws:
ConfigurationException
-
-
Method Details
-
getWaitBeforeNext
public edu.iris.Fissures.model.TimeInterval getWaitBeforeNext()Description copied from interface:EventSource
If the source needs to wait for more events to arrive, it should return the amount of time it wants to wait with this method.- Specified by:
getWaitBeforeNext
in interfaceEventSource
-
caughtUpWithRealtime
protected boolean caughtUpWithRealtime() -
isEverCaughtUpToRealtime
protected boolean isEverCaughtUpToRealtime() -
getQueryStart
protected edu.iris.Fissures.model.MicroSecondDate getQueryStart()- Returns:
- - the next time to start asking for events
-
getQueryTime
protected edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange getQueryTime()- Returns:
- - the next time range to be queried for events
-
increaseQueryTimeWidth
public void increaseQueryTimeWidth() -
decreaseQueryTimeWidth
public void decreaseQueryTimeWidth()decrease the time increment for queries, but only if it is larger than the minimum = 1Day to avoid many tiny queries to the server. -
resetQueryTimeForLag
protected edu.iris.Fissures.model.MicroSecondDate resetQueryTimeForLag()Scoots the query time back by the event lag amount from the run properties to the query start time at the earliest -
getQueryEdge
protected edu.iris.Fissures.model.MicroSecondDate getQueryEdge() throws edu.sc.seis.fissuresUtil.database.NotFound- Returns:
- - latest time queried
- Throws:
edu.sc.seis.fissuresUtil.database.NotFound
-
setQueryEdge
protected void setQueryEdge(edu.iris.Fissures.model.MicroSecondDate edge) sets the latest time queried -
updateQueryEdge
protected void updateQueryEdge(edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange queryTime) -
getSleepUntilTime
public edu.iris.Fissures.model.MicroSecondDate getSleepUntilTime() -
getLag
public edu.iris.Fissures.model.TimeInterval getLag() -
getIncrement
public edu.iris.Fissures.model.TimeInterval getIncrement() -
setIncrement
public void setIncrement(edu.iris.Fissures.model.TimeInterval increment) -
setLag
public void setLag(edu.iris.Fissures.model.TimeInterval lag) -
getRefreshInterval
public edu.iris.Fissures.model.TimeInterval getRefreshInterval()
-