public class Interface extends StandardNamedObject
| Constructor and Description | 
|---|
Interface()
Default Constructor. 
 | 
Interface(List<Service> services)
Constructor that sets the services. 
 | 
Interface(String name)
Constructor that sets the name. 
 | 
Interface(String name,
         List<Service> services)
Constructor that sets the name of interface and sets the services. 
 | 
Interface(String name,
         String service)
Constructor that sets the name and adds service. 
 | 
Interface(String name,
         String service,
         long losttime)
Constructor that sets the name to interface and adds service and outage
 with lost time. 
 | 
Interface(String name,
         String service,
         long losttime,
         long regainedtime)
Constructor that sets the name to interface and adds service and outage
 with lost time and regained time. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addService(Service service)
Adds a new service object to this interface 
 | 
void | 
addService(String service)
Adds a new service to this interface 
 | 
void | 
addService(String service,
          long losttime)
Adds a new service to this interface. 
 | 
void | 
addService(String service,
          long losttime,
          long regainedtime)
Adds a service to this interface with outage having lost time and
 regained time. 
 | 
boolean | 
equals(Object obj) | 
long | 
getDownTime(long currentTime,
           long rollingWindow)
Returns the down time for this interface. 
 | 
Service | 
getService(String svcname)
Return the Service object given the service name 
 | 
int | 
getServiceAffectCount()
Returns the number of services affected. 
 | 
int | 
getServiceCount()
Returns the number of services that this node/interface has. 
 | 
List<Service> | 
getServices()
Return the services 
 | 
getName, setNamepublic Interface()
public Interface(String name, List<Service> services)
name - Name of the interface.services - Services to be set for this interface.public Interface(String name, String service)
name - Name of the interface.service - Name of the service to be addedpublic Interface(String name, String service, long losttime)
name - Name of the interface.service - Name of the service to be addedlosttime - Lost timepublic Interface(String name, String service, long losttime, long regainedtime)
name - Name of the interface.service - Name of the service to be addedlosttime - Lost timeregainedtime - Regained Timepublic Interface(String name)
name - Name of the interface.public Service getService(String svcname)
svcname - The service name to lookup.public void addService(Service service)
service - The service to be add.public void addService(String service)
service - The name of the service to add.public void addService(String service, long losttime)
service - Service name to be addedlosttime - Outage with lost time to be added to servicepublic void addService(String service, long losttime, long regainedtime)
service - Service namelosttime - Lost timeregainedtime - Regained Timepublic long getDownTime(long currentTime,
                        long rollingWindow)
currentTime - End of rolling windowrollingWindow - Rolling Windowpublic int getServiceCount()
public int getServiceAffectCount()
Copyright © 2021. All rights reserved.