Class PollableNetwork
- java.lang.Object
-
- org.opennms.netmgt.poller.pollables.PollableElement
-
- org.opennms.netmgt.poller.pollables.PollableContainer
-
- org.opennms.netmgt.poller.pollables.PollableNetwork
-
public class PollableNetwork extends PollableContainer
Represents a PollableNetwork- Author:
- Mathew Brozowski
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.opennms.netmgt.poller.pollables.PollableContainer
PollableContainer.Accumulator<T>, PollableContainer.Iter, PollableContainer.SimpleIter<T>
-
-
Constructor Summary
Constructors Constructor Description PollableNetwork(PollContext context)
Constructor for PollableNetwork.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Event
createDownEvent(Date date)
createDownEventPollableInterface
createInterface(int nodeId, String nodeLabel, String nodeLocation, InetAddress addr)
createInterfaceprotected Object
createMemberKey(PollableElement member)
createMemberKeyPollableNode
createNode(int nodeId, String nodeLabel, String nodeLocation)
createNodePollableNode
createNodeIfNecessary(int nodeId, String nodeLabel, String nodeLocation)
createNodeIfNecessaryPollableService
createService(int nodeId, String nodeLabel, String nodeLocation, InetAddress addr, String svcName)
createServiceEvent
createUpEvent(Date date)
createUpEventvoid
delete()
deletevoid
dump()
dumpPollEvent
extrapolateCause()
extrapolateCausePollContext
getContext()
getContextPollableInterface
getInterface(int nodeId, InetAddress addr)
getInterfaceprotected PollableElement
getLockRoot()
getLockRootPollableNode
getNode(int nodeId)
getNodeint
getNodeCount()
getNodeCountList<Long>
getNodeIds()
PollableService
getService(int nodeId, InetAddress addr, String svcName)
getServiceprotected void
obtainTreeLock()
obtainTreeLockprotected void
obtainTreeLock(long timeout)
obtainTreeLockPollStatus
poll(PollableElement elem)
pollPollStatus
pollRemainingMembers(PollableElement member)
pollRemainingMembersvoid
processStatusChange(Date date)
processStatusChangevoid
propagateInitialCause()
propagateInitialCausevoid
recalculateStatus()
recalculateStatusprotected void
releaseTreeLock()
releaseTreeLockvoid
resetStatusChanged()
resetStatusChangedprotected void
visitThis(PollableVisitor v)
visitThis-
Methods inherited from class org.opennms.netmgt.poller.pollables.PollableContainer
addMember, deleteMember, deriveValueFromMembers, deriveValueFromMembers, doExtrapolateCause, doInheritParentalCause, forEachMember, forEachMember, getMember, getMemberCount, getMembers, getMemberStatus, poll, processCause, processMemberStatusChanges, processResolution, removeMember, resolveAllOutages, selectPollElement, visit, visitMembers
-
Methods inherited from class org.opennms.netmgt.poller.pollables.PollableElement
createOutage, doPoll, getCause, getParent, getScope, getStatus, hasOpenOutage, inheritParentalCause, isDeleted, isStatusChanged, processComingUp, processGoingDown, processLingeringCauses, resolveOutage, setCause, setParent, updateStatus, withTreeLock, withTreeLock, withTreeLock, withTreeLock
-
-
-
-
Constructor Detail
-
PollableNetwork
public PollableNetwork(PollContext context)
Constructor for PollableNetwork.
- Parameters:
context
- aPollContext
object.
-
-
Method Detail
-
getContext
public PollContext getContext()
getContext
- Specified by:
getContext
in classPollableElement
- Returns:
- a
PollContext
object.
-
createNode
public PollableNode createNode(int nodeId, String nodeLabel, String nodeLocation)
createNode
- Parameters:
nodeId
- a int.nodeLabel
- aString
object.nodeLocation
- aString
object.- Returns:
- a
PollableNode
object.
-
createNodeIfNecessary
public PollableNode createNodeIfNecessary(int nodeId, String nodeLabel, String nodeLocation)
createNodeIfNecessary
- Parameters:
nodeId
- a int.nodeLabel
- aString
object.nodeLocation
- aString
object.- Returns:
- a
PollableNode
object.
-
getNode
public PollableNode getNode(int nodeId)
getNode
- Parameters:
nodeId
- a int.- Returns:
- a
PollableNode
object.
-
getNodeCount
public int getNodeCount()
getNodeCount
- Returns:
- a int.
-
createInterface
public PollableInterface createInterface(int nodeId, String nodeLabel, String nodeLocation, InetAddress addr)
createInterface
- Parameters:
nodeId
- a int.nodeLabel
- aString
object.nodeLocation
- aString
object.addr
- aInetAddress
object.- Returns:
- a
PollableInterface
object.
-
getInterface
public PollableInterface getInterface(int nodeId, InetAddress addr)
getInterface
- Parameters:
nodeId
- a int.addr
- aInetAddress
object.- Returns:
- a
PollableInterface
object.
-
createService
public PollableService createService(int nodeId, String nodeLabel, String nodeLocation, InetAddress addr, String svcName)
createService
- Parameters:
nodeId
- a int.nodeLabel
- aString
object.nodeLocation
- aString
object.addr
- aInetAddress
object.svcName
- aString
object.- Returns:
- a
PollableService
object.
-
getService
public PollableService getService(int nodeId, InetAddress addr, String svcName)
getService
- Parameters:
nodeId
- a int.addr
- aInetAddress
object.svcName
- aString
object.- Returns:
- a
PollableService
object.
-
createMemberKey
protected Object createMemberKey(PollableElement member)
createMemberKey
- Specified by:
createMemberKey
in classPollableContainer
- Parameters:
member
- aPollableElement
object.- Returns:
- a
Object
object.
-
visitThis
protected void visitThis(PollableVisitor v)
visitThis
- Overrides:
visitThis
in classPollableContainer
- Parameters:
v
- aPollableVisitor
object.
-
pollRemainingMembers
public PollStatus pollRemainingMembers(PollableElement member)
pollRemainingMembers
- Overrides:
pollRemainingMembers
in classPollableContainer
- Parameters:
member
- aPollableElement
object.- Returns:
- a
PollStatus
object.
-
createDownEvent
public Event createDownEvent(Date date)
createDownEvent
- Specified by:
createDownEvent
in classPollableElement
- Parameters:
date
- aDate
object.- Returns:
- a
Event
object.
-
createUpEvent
public Event createUpEvent(Date date)
createUpEvent
- Specified by:
createUpEvent
in classPollableElement
- Parameters:
date
- aDate
object.- Returns:
- a
Event
object.
-
dump
public void dump()
dump
-
delete
public void delete()
delete
- Overrides:
delete
in classPollableContainer
-
poll
public PollStatus poll(PollableElement elem)
poll
- Overrides:
poll
in classPollableContainer
- Returns:
- a
PollStatus
object.
-
processStatusChange
public void processStatusChange(Date date)
processStatusChange
- Overrides:
processStatusChange
in classPollableContainer
- Parameters:
date
- aDate
object.
-
recalculateStatus
public void recalculateStatus()
recalculateStatus
- Overrides:
recalculateStatus
in classPollableContainer
-
resetStatusChanged
public void resetStatusChanged()
resetStatusChanged
- Overrides:
resetStatusChanged
in classPollableContainer
-
getLockRoot
protected PollableElement getLockRoot()
getLockRoot
- Overrides:
getLockRoot
in classPollableElement
- Returns:
- a
PollableElement
object.
-
obtainTreeLock
protected void obtainTreeLock()
obtainTreeLock
- Overrides:
obtainTreeLock
in classPollableElement
-
obtainTreeLock
protected void obtainTreeLock(long timeout)
obtainTreeLock
- Overrides:
obtainTreeLock
in classPollableElement
- Parameters:
timeout
- Lock timeout in milliseconds
-
releaseTreeLock
protected void releaseTreeLock()
releaseTreeLock
- Overrides:
releaseTreeLock
in classPollableElement
-
extrapolateCause
public PollEvent extrapolateCause()
extrapolateCause
- Overrides:
extrapolateCause
in classPollableElement
- Returns:
- a
PollEvent
object.
-
propagateInitialCause
public void propagateInitialCause()
propagateInitialCause
-
-