Class NetworkOutage
java.lang.Object
org.deltava.beans.servinfo.NetworkOutage
- All Implemented Interfaces:
Comparable<Object>
,CalendarEntry
,TimeSpan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection
<NetworkOutage> calculate
(OnlineNetwork net, TimeSpan ts, Collection<Instant> fetchTimes, int updateInterval) Creates a list of data feed outages from a Collection of data feed pull times within a given time span.int
boolean
getDate()
Returns this entry's date for ordering in the Calendar.The duration of this span, or null if both times are not set.The end date/time of this span.Return the Online Network that had an outage.The start date/time of this span.int
hashCode()
void
setEndTime
(Instant dt) Updates the end of the outage.void
setStartTime
(Instant dt) Updates the start of the outage.toString()
-
Constructor Details
-
NetworkOutage
-
-
Method Details
-
getNetwork
Return the Online Network that had an outage.- Returns:
- the OnlineNetwork
-
getDate
Description copied from interface:CalendarEntry
Returns this entry's date for ordering in the Calendar.- Specified by:
getDate
in interfaceCalendarEntry
- Returns:
- the date/time
-
getStartTime
Description copied from interface:TimeSpan
The start date/time of this span.- Specified by:
getStartTime
in interfaceTimeSpan
- Returns:
- the start date/time
-
getEndTime
Description copied from interface:TimeSpan
The end date/time of this span.- Specified by:
getEndTime
in interfaceTimeSpan
- Returns:
- the end date/time
-
getDuration
Description copied from interface:TimeSpan
The duration of this span, or null if both times are not set.- Specified by:
getDuration
in interfaceTimeSpan
- Returns:
- a Duration, or null
-
setStartTime
Updates the start of the outage.- Parameters:
dt
- the start date/time
-
setEndTime
Updates the end of the outage.- Parameters:
dt
- the end date/time
-
equals
-
hashCode
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Object>
-
calculate
public static Collection<NetworkOutage> calculate(OnlineNetwork net, TimeSpan ts, Collection<Instant> fetchTimes, int updateInterval) Creates a list of data feed outages from a Collection of data feed pull times within a given time span.- Parameters:
net
- the OnlineNetworkts
- the TimeSpanfetchTimes
- a Collection of pull date/timesupdateInterval
- the fetch interval in seconds- Returns:
- a Collection of NetworkOutage beans
-