1 module config-threads-java {
3 namespace "urn:opendaylight:params:xml:ns:yang:controller:config:threads:java";
6 import config-threads { prefix th2; revision-date 2013-04-09; }
7 import config { prefix config; revision-date 2013-04-05; }
8 import rpc-context { prefix rpcx; revision-date 2013-06-17; }
11 "This module contains the base YANG definitions for NS-OS
12 thread services pure Java implementation.";
14 revision "2013-04-05" {
16 "Updated to work with new anchors.";
19 revision "2013-04-03" {
24 identity thread-rpc-context;
27 base config:module-type;
28 config:provided-service "th2:eventbus";
29 config:java-name-prefix EventBus;
32 identity async-eventbus {
33 base config:module-type;
34 config:provided-service "th2:eventbus";
35 config:java-name-prefix AsyncEventBus;
38 identity threadfactory-naming {
39 base config:module-type;
40 config:provided-service "th2:threadfactory";
41 config:java-name-prefix NamingThreadFactory;
44 identity threadpool-dynamic {
45 base config:module-type;
46 description "threadpool-dynamic description";
47 config:provided-service "th2:threadpool";
48 config:provided-service "th2:scheduled-threadpool";
49 config:java-name-prefix DynamicThreadPool;
52 augment "/config:modules/config:module/config:configuration" {
54 when "/config:modules/config:module/config:type = 'eventbus'";
55 // No real configuration
59 grouping async-eventbus-config-attrs {
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 {
71 config:required-identity th2:threadpool;
76 container from-grouping {
77 uses async-eventbus-config-attrs;
81 augment "/config:modules/config:module/config:state" {
83 when "/config:modules/config:module/config:type = 'async-eventbus'";
84 // simulate not having root runtime bean
86 config:inner-state-bean;
95 typedef thread-state {
100 description "Enum type holding state in which a thread can be.";
103 augment "/config:modules/config:module/config:configuration" {
104 case threadfactory-naming {
105 when "/config:modules/config:module/config:type = 'threadfactory-naming'";
107 description "String that will be prefixed to each created thread. Suffix will be constructed from
108 underscore (_) and auto-incremented index number.";
114 augment "/config:modules/config:module/config:state" {
115 case threadfactory-naming {
116 when "/config:modules/config:module/config:type = 'threadfactory-naming'";
118 config:inner-state-bean;
124 rpcx:rpc-context-instance "thread-rpc-context";
127 config:inner-state-bean;
128 config:java-name-prefix ThreadStream;
129 // no key – key will be generated by incrementing a counter
147 list inner-stream-list {
157 config:inner-state-bean;
165 leaf created-sessions {
173 config:java-name-prefix dumpStack;
175 uses rpcx:rpc-context-ref {
176 refine context-instance {
177 rpcx:rpc-context-instance thread-rpc-context;
185 uses rpcx:rpc-context-ref {
186 refine context-instance {
187 rpcx:rpc-context-instance thread-rpc-context;
202 augment "/config:modules/config:module/config:configuration" {
203 case threadpool-dynamic {
204 when "/config:modules/config:module/config:type = 'threadpool-dynamic'";
205 container threadpool-dynamic {
218 description "maximum-size description";
225 container threadfactory {
226 description "threadfactory description";
227 uses config:service-ref {
230 config:required-identity th2:threadfactory;
239 leaf-list users-numbers {
241 description "numbers of users description";
247 augment "/config:modules/config:module/config:state" {
248 case threadpool-dynamic {
249 when "/config:modules/config:module/config:type = 'threadpool-dynamic'";
250 container threadpool-dynamic {
252 leaf created-sessions {
259 identity threadpool-registry-impl {
260 base config:module-type;
261 config:java-name-prefix ThreadPoolRegistryImpl;
264 augment "/config:modules/config:module/config:configuration" {
265 case threadpool-registry-impl {
266 when "/config:modules/config:module/config:type = 'threadpool-registry-impl'";
268 // list of dependencies:
270 uses config:service-ref {
273 config:required-identity th2:threadpool;