java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.aoindustries.noc.monitor.NodeImpl
com.aoindustries.noc.monitor.RootNodeImpl
- All Implemented Interfaces:
Node
,RootNode
,Serializable
,Remote
The top-level node has one child for each of the servers.
There is no stop here because root nodes keep running forever in the background to be reconnected to. The overhead of this is reduced by using workers and only creating one rootNode per user.
- Author:
- AO Industries, Inc.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionfinal AoservConnector
static final Executors
One thread pool is shared by all components, and it is never disposed.static final Random
A fast pseudo-random number generator for non-cryptographic purposes.final Locale
Fields inherited from class java.rmi.server.RemoteObject
ref
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTreeListener
(TreeListener treeListener) Defaults to the alert category of the parent node.The alert level is equal to the highest alert level of its children.No alert messages.boolean
getLabel()
static int
Gets the top-level persistence directory.Creates a directory if not exists, throwing an exception when is not a directory or unable to create.void
Notifies all of the listeners.void
nodeAlertLevelChanged
(NodeImpl node, AlertLevel oldAlertLevel, AlertLevel newAlertLevel, String alertMessage) void
Notifies all of the listeners.void
removeTreeListener
(TreeListener treeListener) static Future
<?> Schedules a task to be performed in the future.Methods inherited from class com.aoindustries.noc.monitor.NodeImpl
constrainAlertLevel, getMaxAlertLevel, getSnapshot, getSnapshot, getSnapshot, getSnapshot, getSnapshot, getSnapshot, toString
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObject
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toStub
-
Field Details
-
fastRandom
A fast pseudo-random number generator for non-cryptographic purposes. -
executors
One thread pool is shared by all components, and it is never disposed. -
locale
-
conn
-
-
Method Details
-
schedule
Schedules a task to be performed in the future. It will be performed in a background thread via the ExecutorService. -
getParent
-
getAllowsChildren
public boolean getAllowsChildren()- Specified by:
getAllowsChildren
in interfaceNode
- Specified by:
getAllowsChildren
in classNodeImpl
-
getChildren
- Specified by:
getChildren
in interfaceNode
- Specified by:
getChildren
in classNodeImpl
-
getAlertLevel
The alert level is equal to the highest alert level of its children.- Specified by:
getAlertLevel
in interfaceNode
- Specified by:
getAlertLevel
in classNodeImpl
- See Also:
-
getAlertMessage
No alert messages.- Specified by:
getAlertMessage
in interfaceNode
- Specified by:
getAlertMessage
in classNodeImpl
-
getAlertCategory
Description copied from class:NodeImpl
Defaults to the alert category of the parent node.- Specified by:
getAlertCategory
in interfaceNode
- Overrides:
getAlertCategory
in classNodeImpl
- See Also:
-
getLabel
-
addTreeListener
- Specified by:
addTreeListener
in interfaceRootNode
-
removeTreeListener
- Specified by:
removeTreeListener
in interfaceRootNode
-
nodeAdded
public void nodeAdded()Notifies all of the listeners. Batches the calls into a per-listener background task. Each of the background tasks may send one event representing any number of changes. Each background task will wait 250 ms between each send. -
nodeRemoved
public void nodeRemoved()Notifies all of the listeners. Batches the calls into a per-listener background task. Each of the background tasks may send one event representing any number of changes. Each background task will wait 250 ms between each send. -
nodeAlertLevelChanged
public void nodeAlertLevelChanged(NodeImpl node, AlertLevel oldAlertLevel, AlertLevel newAlertLevel, String alertMessage) throws RemoteException - Throws:
RemoteException
- See Also:
-
getSnapshot
- Specified by:
getSnapshot
in interfaceRootNode
- Throws:
RemoteException
-
mkdir
Creates a directory if not exists, throwing an exception when is not a directory or unable to create.- Throws:
IOException
-
getPersistenceDirectory
Gets the top-level persistence directory.- Throws:
IOException
-
getNextStartupDelayFifteenMinutes
public static int getNextStartupDelayFifteenMinutes()
-