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 augment "/config:modules/config:module/config:configuration" {
61 when "/config:modules/config:module/config:type = 'async-eventbus'";
62 container threadpool {
63 uses config:service-ref {
65 config:required-identity th2:threadpool;
71 augment "/config:modules/config:module/config:state" {
73 when "/config:modules/config:module/config:type = 'async-eventbus'";
74 // simulate not having root runtime bean
76 config:inner-state-bean;
85 typedef thread-state {
90 description "Enum type holding state in which a thread can be.";
93 augment "/config:modules/config:module/config:configuration" {
94 case threadfactory-naming {
95 when "/config:modules/config:module/config:type = 'threadfactory-naming'";
97 description "String that will be prefixed to each created thread. Suffix will be constructed from
98 underscore (_) and auto-incremented index number.";
104 augment "/config:modules/config:module/config:state" {
105 case threadfactory-naming {
106 when "/config:modules/config:module/config:type = 'threadfactory-naming'";
108 config:inner-state-bean;
114 rpcx:rpc-context-instance "thread-rpc-context";
117 config:inner-state-bean;
118 config:java-name-prefix ThreadStream;
119 // no key – key will be generated by incrementing a counter
137 list inner-stream-list {
147 config:inner-state-bean;
155 leaf created-sessions {
163 config:java-name-prefix dumpStack;
165 uses rpcx:rpc-context-ref {
166 refine context-instance {
167 rpcx:rpc-context-instance thread-rpc-context;
175 uses rpcx:rpc-context-ref {
176 refine context-instance {
177 rpcx:rpc-context-instance thread-rpc-context;
192 augment "/config:modules/config:module/config:configuration" {
193 case threadpool-dynamic {
194 when "/config:modules/config:module/config:type = 'threadpool-dynamic'";
195 container threadpool-dynamic {
208 description "maximum-size description";
215 container threadfactory {
216 description "threadfactory description";
217 uses config:service-ref {
220 config:required-identity th2:threadfactory;
229 leaf-list users-numbers {
231 description "numbers of users description";
237 augment "/config:modules/config:module/config:state" {
238 case threadpool-dynamic {
239 when "/config:modules/config:module/config:type = 'threadpool-dynamic'";
240 container threadpool-dynamic {
242 leaf created-sessions {
249 identity threadpool-registry-impl {
250 base config:module-type;
251 config:java-name-prefix ThreadPoolRegistryImpl;
254 augment "/config:modules/config:module/config:configuration" {
255 case threadpool-registry-impl {
256 when "/config:modules/config:module/config:type = 'threadpool-registry-impl'";
258 // list of dependencies:
260 uses config:service-ref {
263 config:required-identity th2:threadpool;