Interface ReadablePollOutagesDao

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.Calendar getEndOfOutage​(java.lang.String outName)
      getEndOfOutage
      java.util.Calendar getEndOfOutage​(Outage out)
      Return a calendar representing the end time of this outage, assuming it's currently active (i.e.
      java.util.List<Interface> getInterfaces​(java.lang.String name)
      Return the interfaces for specified outage.
      java.util.List<Node> getNodeIds​(java.lang.String name)
      getNodeIds
      java.util.List<Time> getOutageTimes​(java.lang.String name)
      Return the outage times for specified outage.
      java.lang.String getOutageType​(java.lang.String name)
      Return the type for specified outage.
      boolean isCurTimeInOutage​(java.lang.String outName)
      Return if current time is part of specified outage.
      boolean isCurTimeInOutage​(Outage out)
      Return if current time is part of specified outage.
      boolean isInterfaceInOutage​(java.lang.String linterface, java.lang.String outName)
      Return if interfaces is part of specified outage.
      boolean isInterfaceInOutage​(java.lang.String linterface, Outage out)
      Return if interfaces is part of specified outage.
      boolean isNodeIdInOutage​(long lnodeid, java.lang.String outName)
      Return if the node represented by the nodeid is part of specified outage.
      boolean isNodeIdInOutage​(long lnodeid, Outage out)
      Return if nodeid is part of specified outage
      boolean isTimeInOutage​(long time, java.lang.String outName)
      Return if time is part of specified outage.
      boolean isTimeInOutage​(java.util.Calendar cal, java.lang.String outName)
      Return if time is part of specified outage.
      boolean isTimeInOutage​(java.util.Calendar cal, Outage outage)
      Return if time is part of specified outage.
    • Method Detail

      • isNodeIdInOutage

        boolean isNodeIdInOutage​(long lnodeid,
                                 java.lang.String outName)
        Return if the node represented by the nodeid is part of specified outage.
        Parameters:
        lnodeid - the nodeid to be checked
        outName - the outage name
        Returns:
        the node is part of the specified outage
      • isInterfaceInOutage

        boolean isInterfaceInOutage​(java.lang.String linterface,
                                    java.lang.String outName)
        Return if interfaces is part of specified outage.
        Parameters:
        linterface - the interface to be looked up
        outName - the outage name
        Returns:
        the interface is part of the specified outage
      • isCurTimeInOutage

        boolean isCurTimeInOutage​(java.lang.String outName)
        Return if current time is part of specified outage.
        Parameters:
        outName - the outage name
        Returns:
        true if current time is in outage
      • isTimeInOutage

        boolean isTimeInOutage​(long time,
                               java.lang.String outName)
        Return if time is part of specified outage.
        Parameters:
        time - the time in millis to look up
        outName - the outage name
        Returns:
        true if time is in outage
      • getOutageType

        java.lang.String getOutageType​(java.lang.String name)
        Return the type for specified outage.
        Parameters:
        name - the outage that is to be looked up
        Returns:
        the type for the specified outage, null if not found
      • getOutageTimes

        java.util.List<Time> getOutageTimes​(java.lang.String name)
        Return the outage times for specified outage.
        Parameters:
        name - the outage that is to be looked up
        Returns:
        the outage times for the specified outage, null if not found
      • getInterfaces

        java.util.List<Interface> getInterfaces​(java.lang.String name)
        Return the interfaces for specified outage.
        Parameters:
        name - the outage that is to be looked up
        Returns:
        the interfaces for the specified outage, null if not found
      • isInterfaceInOutage

        boolean isInterfaceInOutage​(java.lang.String linterface,
                                    Outage out)
        Return if interfaces is part of specified outage.
        Parameters:
        linterface - the interface to be looked up
        getOutageSchedule - (out) the outage
        Returns:
        the interface is part of the specified outage
      • isTimeInOutage

        boolean isTimeInOutage​(java.util.Calendar cal,
                               java.lang.String outName)
        Return if time is part of specified outage.
      • isTimeInOutage

        boolean isTimeInOutage​(java.util.Calendar cal,
                               Outage outage)
        Return if time is part of specified outage.
        Parameters:
        cal - the calendar to lookup
        getOutageSchedule - (outage) the outage
        Returns:
        true if time is in outage
      • isCurTimeInOutage

        boolean isCurTimeInOutage​(Outage out)
        Return if current time is part of specified outage.
        Parameters:
        getOutageSchedule - (out) the outage
        Returns:
        true if current time is in outage
      • getNodeIds

        java.util.List<Node> getNodeIds​(java.lang.String name)

        getNodeIds

        Parameters:
        name - a String object.
        Returns:
        an array of Node objects.
      • getEndOfOutage

        java.util.Calendar getEndOfOutage​(java.lang.String outName)

        getEndOfOutage

        Parameters:
        outName - a String object.
        Returns:
        a Calendar object.
      • getEndOfOutage

        java.util.Calendar getEndOfOutage​(Outage out)
        Return a calendar representing the end time of this outage, assuming it's currently active (i.e. right now is within one of the time periods) FIXME: This code is almost identical to isTimeInOutage... We need to fix it
        Parameters:
        getOutageSchedule - (out) a Outage object.
        Returns:
        a Calendar object.
      • isNodeIdInOutage

        boolean isNodeIdInOutage​(long lnodeid,
                                 Outage out)

        Return if nodeid is part of specified outage

        Parameters:
        lnodeid - the nodeid to be looked up
        getOutageSchedule - (out) a Outage object.
        Returns:
        the node iis part of the specified outage