1 // vi: set smarttab et sw=4 tabstop=4:
2 module threadpool-impl {
4 namespace "urn:opendaylight:params:xml:ns:yang:controller:threadpool:impl";
7 import threadpool { prefix th; revision-date 2013-04-09; }
8 import config { prefix config; revision-date 2013-04-05; }
9 import rpc-context { prefix rpcx; revision-date 2013-06-17; }
11 organization "Cisco Systems, Inc.";
13 contact "Robert Varga <rovarga@cisco.com>";
16 "This module contains the base YANG definitions for
17 thread services pure Java implementation.
19 Copyright (c)2013 Cisco Systems, Inc. All rights reserved.;
21 This program and the accompanying materials are made available
22 under the terms of the Eclipse Public License v1.0 which
23 accompanies this distribution, and is available at
24 http://www.eclipse.org/legal/epl-v10.html";
26 revision "2013-04-05" {
28 "Updated to work with new anchors.";
31 revision "2013-04-03" {
33 "Initial revision by Anton Tkacik, Tomas Olvecky and
38 base config:module-type;
39 config:provided-service th:eventbus;
40 config:java-name-prefix EventBus;
43 augment "/config:modules/config:module/config:configuration" {
45 when "/config:modules/config:module/config:type = 'eventbus'";
46 // No real configuration
50 augment "/config:modules/config:module/config:state" {
52 when "/config:modules/config:module/config:type = 'eventbus'";
53 rpcx:rpc-context-instance "event-bus-rpc";
57 identity event-bus-rpc;
59 identity async-eventbus {
60 base config:module-type;
61 config:provided-service th:eventbus;
62 config:java-name-prefix AsyncEventBus;
65 augment "/config:modules/config:module/config:configuration" {
67 when "/config:modules/config:module/config:type = 'async-eventbus'";
68 container threadpool {
69 uses config:service-ref {
72 config:required-identity th:threadpool;
79 augment "/config:modules/config:module/config:state" {
81 when "/config:modules/config:module/config:type = 'async-eventbus'";
82 rpcx:rpc-context-instance "event-bus-rpc";
86 rpc get-dead-events-count {
87 config:java-name-prefix countDeadEvents;
89 uses rpcx:rpc-context-ref {
90 refine context-instance {
91 rpcx:rpc-context-instance event-bus-rpc;
102 identity threadfactory-naming {
103 base config:module-type;
104 config:provided-service th:threadfactory;
105 config:java-name-prefix NamingThreadFactory;
108 augment "/config:modules/config:module/config:configuration" {
109 case threadfactory-naming {
110 when "/config:modules/config:module/config:type = 'threadfactory-naming'";
117 identity threadpool-fixed {
118 base config:module-type;
119 config:provided-service th:threadpool;
120 config:java-name-prefix FixedThreadPool;
123 augment "/config:modules/config:module/config:configuration" {
124 case threadpool-fixed {
125 when "/config:modules/config:module/config:type = 'threadpool-fixed'";
126 leaf max-thread-count {
130 container threadFactory {
131 uses config:service-ref {
134 config:required-identity th:threadfactory;
141 identity threadpool-flexible {
142 base config:module-type;
143 config:provided-service th:threadpool;
144 config:java-name-prefix FlexibleThreadPool;
147 augment "/config:modules/config:module/config:configuration" {
148 case threadpool-flexible {
149 when "/config:modules/config:module/config:type = 'threadpool-flexible'";
150 leaf max-thread-count {
153 leaf minThreadCount {
156 leaf keepAliveMillis {
160 container threadFactory {
161 uses config:service-ref {
164 config:required-identity th:threadfactory;
171 identity threadpool-scheduled {
172 base config:module-type;
173 config:provided-service th:scheduled-threadpool;
174 config:java-name-prefix ScheduledThreadPool;
177 augment "/config:modules/config:module/config:configuration" {
178 case threadpool-scheduled {
179 when "/config:modules/config:module/config:type = 'threadpool-scheduled'";
180 leaf max-thread-count {
184 container threadFactory {
185 uses config:service-ref {
188 config:required-identity th:threadfactory;