83c4cccfebb309c07af759213cd32a9aa843ed14
[controller.git] / opendaylight / config / threadpool-config-impl / src / main / java / org / opendaylight / controller / config / yang / threadpool / impl / scheduled / ScheduledThreadPoolModule.java
1 /**
2 * Generated file
3
4 * Generated from: yang module name: threadpool-impl-scheduled  yang module local name: threadpool-scheduled
5 * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
6 * Generated at: Sun Dec 01 17:13:32 CET 2013
7 *
8 * Do not modify this file unless it is present under src/main directory
9 */
10 package org.opendaylight.controller.config.yang.threadpool.impl.scheduled;
11
12 import org.opendaylight.controller.config.api.JmxAttributeValidationException;
13 import org.opendaylight.controller.config.threadpool.util.ScheduledThreadPoolWrapper;
14
15 /**
16 *
17 */
18 public final class ScheduledThreadPoolModule extends org.opendaylight.controller.config.yang.threadpool.impl.scheduled.AbstractScheduledThreadPoolModule
19 {
20
21     public ScheduledThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
22         super(identifier, dependencyResolver);
23     }
24
25     public ScheduledThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, ScheduledThreadPoolModule oldModule, java.lang.AutoCloseable oldInstance) {
26         super(identifier, dependencyResolver, oldModule, oldInstance);
27     }
28
29     @Override
30     public void validate(){
31         super.validate();
32         JmxAttributeValidationException.checkNotNull(getMaxThreadCount(), maxThreadCountJmxAttribute);
33         JmxAttributeValidationException.checkCondition(getMaxThreadCount() > 0, "must be greater than zero",
34                 maxThreadCountJmxAttribute);
35     }
36
37     @Override
38     public java.lang.AutoCloseable createInstance() {
39         return new ScheduledThreadPoolWrapper(getMaxThreadCount(), getThreadFactoryDependency());
40     }
41 }