Package edu.sc.seis.sod.source.event
Class DelayedEventSource
java.lang.Object
edu.sc.seis.sod.source.AbstractSource
edu.sc.seis.sod.source.event.AbstractEventSource
edu.sc.seis.sod.source.event.DelayedEventSource
- All Implemented Interfaces:
EventSource
,Source
-
Field Summary
Fields inherited from class edu.sc.seis.sod.source.event.AbstractEventSource
caughtUpToRealtime, EVENT_LAG, EVENT_QUERY_INCREMENT, EVENT_REFRESH_INTERVAL, everCaughtUpToRealtime, increment, lag, lastQueryTime, MIN_INCREMENT, nearRealTimeInterval, NO_DNS, refreshInterval, sleepUntilTime
Fields inherited from class edu.sc.seis.sod.source.AbstractSource
name, NAME_ELEMENT, RETRIES_ELEMENT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DelayedEventSource
(edu.iris.Fissures.model.TimeInterval delay, EventSource source) DelayedEventSource
(Element config) -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkEvent
(edu.sc.seis.fissuresUtil.cache.CacheEvent e) edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange
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.boolean
hasNext()
edu.sc.seis.fissuresUtil.cache.CacheEvent[]
next()
Methods inherited from class edu.sc.seis.sod.source.event.AbstractEventSource
caughtUpWithRealtime, decreaseQueryTimeWidth, getIncrement, getLag, getQueryEdge, getQueryStart, getQueryTime, getRefreshInterval, getSleepUntilTime, increaseQueryTimeWidth, isEverCaughtUpToRealtime, resetQueryTimeForLag, setIncrement, setLag, setQueryEdge, updateQueryEdge
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.Source
appendToName, getName, getRetries
-
Constructor Details
-
DelayedEventSource
-
DelayedEventSource
- Throws:
ConfigurationException
-
-
Method Details
-
getDescription
- Specified by:
getDescription
in interfaceEventSource
-
getEventTimeRange
public edu.sc.seis.fissuresUtil.time.MicroSecondTimeRange getEventTimeRange()- Specified by:
getEventTimeRange
in interfaceEventSource
- Returns:
- - a MicroSecondTimeRange starting at least as early as the earliest event and ending at least as late as the latest event. No event should be returned by this source with an origin before the begin time or after the end time of this range.
-
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
- Overrides:
getWaitBeforeNext
in classAbstractEventSource
-
hasNext
public boolean hasNext()- Specified by:
hasNext
in interfaceEventSource
- Returns:
- - false when this event source will return no new events from calls to next
-
next
public edu.sc.seis.fissuresUtil.cache.CacheEvent[] next()- Specified by:
next
in interfaceEventSource
- Returns:
- - the next set of events. Events can be returned from this method multiple times
-
checkEvent
public boolean checkEvent(edu.sc.seis.fissuresUtil.cache.CacheEvent e)
-