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.intbooleangetDate()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.inthashCode()voidsetEndTime(Instant dt) Updates the end of the outage.voidsetStartTime(Instant dt) Updates the start of the outage.toString()Methods inherited from interface TimeSpan
hasTimes, validateDatesModifier and TypeMethodDescriptiondefault booleanhasTimes()Returns whether the start and end times are populated.default voidValidates that the start/end dates are present and is chronological order.
-
Constructor Details
-
NetworkOutage
-
-
Method Details
-
getNetwork
Return the Online Network that had an outage.- Returns:
- the OnlineNetwork
-
getDate
Description copied from interface:CalendarEntryReturns this entry's date for ordering in the Calendar.- Specified by:
getDatein interfaceCalendarEntry- Returns:
- the date/time
-
getStartTime
Description copied from interface:TimeSpanThe start date/time of this span.- Specified by:
getStartTimein interfaceTimeSpan- Returns:
- the start date/time
-
getEndTime
Description copied from interface:TimeSpanThe end date/time of this span.- Specified by:
getEndTimein interfaceTimeSpan- Returns:
- the end date/time
-
getDuration
Description copied from interface:TimeSpanThe duration of this span, or null if both times are not set.- Specified by:
getDurationin 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:
compareToin 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
-