public class NodeCache extends Object
Constructor and Description |
---|
NodeCache(NodeDao nodeDao,
SessionUtils sessionUtils) |
Modifier and Type | Method and Description |
---|---|
void |
setTimeoutInMs(long timeoutInMs) |
void |
triggerIfNeeded(long nodeId,
java.util.function.Consumer<OnmsNode> consumer)
Calls the given consumer with a OnmsNode object corresponding to the given nodeId
if no call has been made for this node within the configured timeout.
|
public NodeCache(NodeDao nodeDao, SessionUtils sessionUtils)
public void triggerIfNeeded(long nodeId, java.util.function.Consumer<OnmsNode> consumer)
nodeId
- db id of the node to queryconsumer
- callback to issue with the node, if the timeout has not expired since the last callbackpublic void setTimeoutInMs(long timeoutInMs)
Copyright © 2021. All rights reserved.