public class RTCHashMap extends Object
Constructor and Description |
---|
RTCHashMap(int initialCapacity)
constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(RTCNode rtcN)
Add an rtc node
|
void |
delete(RTCNode rtcN)
delete
|
void |
deleteNode(long nodeid)
deleteNode
|
RTCNode |
getRTCNode(long nodeid,
InetAddress ipaddr,
String svcname)
getRTCNode
|
RTCNode |
getRTCNode(RTCNodeKey key)
getRTCNode
|
List<RTCNode> |
getRTCNodes(long nodeid)
getRTCNodes
|
List<RTCNode> |
getRTCNodes(long nodeid,
InetAddress ip)
getRTCNodes
|
int |
getServiceCount(long nodeid,
String catLabel)
Get the count of services for a node in the context of the the specified
category
|
int |
getServiceDownCount(long nodeid,
String catLabel)
Get the count of services currently down for a node in the context of the
the specified category
|
double |
getValue(long nodeid,
String catLabel,
long curTime,
long rollingWindow)
Get the value (uptime) for the a node that belongs to the category in the
last 'rollingWindow' starting at current time
|
double |
getValue(String catLabel,
long curTime,
long rollingWindow)
Get the value (uptime) for a category in the last 'rollingWindow'
starting at current time
|
boolean |
isIpValidated(long nodeid,
InetAddress ip,
String catLabel)
Check if this IP has already been validated for this category
|
public RTCHashMap(int initialCapacity)
initialCapacity
- a int.public void add(RTCNode rtcN)
rtcN
- the rtcNode to addpublic boolean isIpValidated(long nodeid, InetAddress ip, String catLabel)
nodeid
- the node id whose interface is to be validatedip
- the ip to be validatedcatLabel
- the category whose rule this ip is to passpublic double getValue(String catLabel, long curTime, long rollingWindow)
catLabel
- the category to which the node should belong tocurTime
- the current timerollingWindow
- the window for which value is to be calculatedpublic double getValue(long nodeid, String catLabel, long curTime, long rollingWindow)
nodeid
- the node for which value is to be calculatedcatLabel
- the category to which the node should belong tocurTime
- the current timerollingWindow
- the window for which value is to be calculatedpublic int getServiceCount(long nodeid, String catLabel)
nodeid
- the node for which servicecount is neededcatLabel
- the category to which the node should belong topublic int getServiceDownCount(long nodeid, String catLabel)
nodeid
- the node for which servicecount is neededcatLabel
- the category to which the node should belong topublic RTCNode getRTCNode(RTCNodeKey key)
getRTCNode
key
- a RTCNodeKey
object.RTCNode
object.public RTCNode getRTCNode(long nodeid, InetAddress ipaddr, String svcname)
getRTCNode
public List<RTCNode> getRTCNodes(long nodeid)
getRTCNodes
nodeid
- a long.List
object.public List<RTCNode> getRTCNodes(long nodeid, InetAddress ip)
getRTCNodes
public void deleteNode(long nodeid)
deleteNode
nodeid
- a long.Copyright © 2020. All rights reserved.