本文整理汇总了Java中org.onosproject.cpman.MetricsDatabase.Builder方法的典型用法代码示例。如果您正苦于以下问题:Java MetricsDatabase.Builder方法的具体用法?Java MetricsDatabase.Builder怎么用?Java MetricsDatabase.Builder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.onosproject.cpman.MetricsDatabase
的用法示例。
在下文中一共展示了MetricsDatabase.Builder方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: genMDbBuilder
import org.onosproject.cpman.MetricsDatabase; //导入方法依赖的package包/类
/**
* Builds and returns metric database instance with given resource name,
* resource type and metric type.
*
* @param resourceName resource name
* @param resourceType resource type
* @param metricTypes metric type
* @return metric database instance
*/
private MetricsDatabase genMDbBuilder(String resourceName,
Type resourceType,
Set<ControlMetricType> metricTypes) {
MetricsDatabase.Builder builder = new DefaultMetricsDatabase.Builder();
builder.withMetricName(resourceType.toString());
builder.withResourceName(resourceName);
metricTypes.forEach(type -> builder.addMetricType(type.toString()));
return builder.build();
}
示例2: genMDbBuilder
import org.onosproject.cpman.MetricsDatabase; //导入方法依赖的package包/类
private MetricsDatabase.Builder genMDbBuilder(ControlResource.Type resourceType,
Set<ControlMetricType> metricTypes) {
MetricsDatabase.Builder builder = new DefaultMetricsDatabase.Builder();
builder.withMetricName(resourceType.toString());
metricTypes.forEach(type -> builder.addMetricType(type.toString()));
return builder;
}
示例3: withResourceName
import org.onosproject.cpman.MetricsDatabase; //导入方法依赖的package包/类
@Override
public MetricsDatabase.Builder withResourceName(String resource) {
this.resourceName = resource;
return this;
}