本文整理汇总了Java中org.opendaylight.controller.sal.core.Tables类的典型用法代码示例。如果您正苦于以下问题:Java Tables类的具体用法?Java Tables怎么用?Java Tables使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Tables类属于org.opendaylight.controller.sal.core包,在下文中一共展示了Tables类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addNode
import org.opendaylight.controller.sal.core.Tables; //导入依赖的package包/类
private void addNode(ISwitch sw) {
Node node = NodeCreator.createOFNode(sw.getId());
UpdateType type = UpdateType.ADDED;
Set<Property> props = new HashSet<Property>();
Long sid = (Long) node.getID();
Date connectedSince = controller.getSwitches().get(sid)
.getConnectedDate();
Long connectedSinceTime = (connectedSince == null) ? 0 : connectedSince
.getTime();
props.add(new TimeStamp(connectedSinceTime, "connectedSince"));
props.add(new MacAddress(deriveMacAddress(sid)));
byte tables = sw.getTables();
Tables t = new Tables(tables);
if (t != null) {
props.add(t);
}
int cap = sw.getCapabilities();
Capabilities c = new Capabilities(cap);
if (c != null) {
props.add(c);
}
int act = sw.getActions();
Actions a = new Actions(act);
if (a != null) {
props.add(a);
}
int buffers = sw.getBuffers();
Buffers b = new Buffers(buffers);
if (b != null) {
props.add(b);
}
nodeProps.put(node, props);
// Notify all internal and external listeners
notifyInventoryShimListener(node, type, props);
}