public abstract class PollOutagesConfigManager extends AbstractWritableJaxbConfigDao<Outages,Outages> implements PollOutagesConfig
AbstractJaxbConfigDao.JaxbReloadCallback
Constructor and Description |
---|
PollOutagesConfigManager() |
Modifier and Type | Method and Description |
---|---|
void |
addOutage(Outage newOutage)
addOutage
|
void |
afterPropertiesSet()
afterPropertiesSet
|
static Calendar |
getEndOfOutage(Outage out)
Return a calendar representing the end time of this outage, assuming it's
currently active (i.e.
|
Calendar |
getEndOfOutage(String outName)
getEndOfOutage
|
List<Interface> |
getInterfaces(String name)
Return the interfaces for specified outage.
|
List<Node> |
getNodeIds(String name)
getNodeIds
|
protected Outages |
getObject()
getConfig
|
Outage |
getOutage(String name)
Return the specified outage.
|
List<Outage> |
getOutages()
Return the outages configured.
|
List<Time> |
getOutageTimes(String name)
Return the outage times for specified outage.
|
String |
getOutageType(String name)
Return the type for specified outage.
|
boolean |
isCurTimeInOutage(Outage out)
Return if current time is part of specified outage.
|
boolean |
isCurTimeInOutage(String outName)
Return if current time is part of specified outage.
|
boolean |
isInterfaceInOutage(String linterface,
Outage out)
Return if interfaces is part of specified outage.
|
boolean |
isInterfaceInOutage(String linterface,
String outName)
Return if interfaces is part of specified outage.
|
boolean |
isNodeIdInOutage(long lnodeid,
Outage out)
Return if nodeid is part of specified outage
|
boolean |
isNodeIdInOutage(long lnodeid,
String outName)
Return if the node represented by the nodeid is part of specified outage.
|
boolean |
isTimeInOutage(Calendar cal,
Outage outage)
Return if time is part of specified outage.
|
boolean |
isTimeInOutage(Calendar cal,
String outName)
Return if time is part of specified outage.
|
boolean |
isTimeInOutage(long time,
String outName)
Return if time is part of specified outage.
|
void |
removeOutage(Outage outageToRemove)
removeOutage
|
void |
removeOutage(String outageName)
removeOutage
|
void |
replaceOutage(Outage oldOutage,
Outage newOutage)
replaceOutage
|
protected Outages |
translateConfig(Outages outages)
translateConfig
|
getReadLock, getWriteLock, saveCurrent, update
getConfigResource, getContainer, getDescription, getReloadCheckInterval, loadConfig, setConfigResource, setReloadCheckInterval
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
update
public void afterPropertiesSet() throws org.springframework.dao.DataAccessException
afterPropertiesSet
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
afterPropertiesSet
in class AbstractJaxbConfigDao<Outages,Outages>
org.springframework.dao.DataAccessException
protected Outages translateConfig(Outages outages)
AbstractJaxbConfigDao
translateConfig
translateConfig
in class AbstractJaxbConfigDao<Outages,Outages>
outages
- a K object.protected Outages getObject()
getConfig
getObject
in class AbstractWritableJaxbConfigDao<Outages,Outages>
public List<Outage> getOutages()
public Outage getOutage(String name)
name
- the outage that is to be looked uppublic String getOutageType(String name)
name
- the outage that is to be looked uppublic List<Time> getOutageTimes(String name)
name
- the outage that is to be looked uppublic List<Interface> getInterfaces(String name)
name
- the outage that is to be looked uppublic boolean isInterfaceInOutage(String linterface, String outName)
isInterfaceInOutage
in interface PollOutagesConfig
linterface
- the interface to be looked upoutName
- the outage namepublic boolean isInterfaceInOutage(String linterface, Outage out)
linterface
- the interface to be looked upgetOutageSchedule(out)
- the outagepublic boolean isTimeInOutage(Calendar cal, String outName)
public boolean isTimeInOutage(long time, String outName)
isTimeInOutage
in interface PollOutagesConfig
time
- the time in millis to look upoutName
- the outage namepublic boolean isTimeInOutage(Calendar cal, Outage outage)
cal
- the calendar to lookupgetOutageSchedule(outage)
- the outagepublic boolean isCurTimeInOutage(String outName)
isCurTimeInOutage
in interface PollOutagesConfig
outName
- the outage namepublic boolean isCurTimeInOutage(Outage out)
getOutageSchedule(out)
- the outagepublic void addOutage(Outage newOutage)
addOutage
getOutageSchedule(newOutage)
- a Outage
object.public void removeOutage(String outageName)
removeOutage
outageName
- a String
object.public void removeOutage(Outage outageToRemove)
removeOutage
getOutageSchedule(outageToRemove)
- a Outage
object.public boolean isNodeIdInOutage(long lnodeid, String outName)
Return if nodeid is part of specified outage
isNodeIdInOutage
in interface PollOutagesConfig
lnodeid
- the nodeid to be checkedoutName
- the outage namepublic static Calendar getEndOfOutage(Outage out)
Copyright © 2018. All rights reserved.