2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
12 * Generated from: yang module name: threadpool-impl-flexible yang module local name: threadpool-flexible
13 * Generated by: org.opendaylight.controller.config.yangjmxgenerator.plugin.JMXGenerator
14 * Generated at: Sun Dec 01 17:13:32 CET 2013
16 * Do not modify this file unless it is present under src/main directory
18 package org.opendaylight.controller.config.yang.threadpool.impl.flexible;
20 import java.util.concurrent.TimeUnit;
22 import org.opendaylight.controller.config.api.JmxAttributeValidationException;
23 import org.opendaylight.controller.config.threadpool.util.FlexibleThreadPoolWrapper;
28 public final class FlexibleThreadPoolModule extends org.opendaylight.controller.config.yang.threadpool.impl.flexible.AbstractFlexibleThreadPoolModule
31 public FlexibleThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver) {
32 super(identifier, dependencyResolver);
35 public FlexibleThreadPoolModule(org.opendaylight.controller.config.api.ModuleIdentifier identifier, org.opendaylight.controller.config.api.DependencyResolver dependencyResolver, FlexibleThreadPoolModule oldModule, java.lang.AutoCloseable oldInstance) {
36 super(identifier, dependencyResolver, oldModule, oldInstance);
40 public void validate(){
42 JmxAttributeValidationException.checkNotNull(getKeepAliveMillis(), keepAliveMillisJmxAttribute);
43 JmxAttributeValidationException.checkCondition(getKeepAliveMillis() > 0, "must be greater than zero",
44 keepAliveMillisJmxAttribute);
46 JmxAttributeValidationException.checkNotNull(getMinThreadCount(), minThreadCountJmxAttribute);
47 JmxAttributeValidationException.checkCondition(getMinThreadCount() > 0, "must be greater than zero",
48 minThreadCountJmxAttribute);
50 JmxAttributeValidationException.checkNotNull(getMaxThreadCount(), maxThreadCountJmxAttribute);
51 JmxAttributeValidationException.checkCondition(getMaxThreadCount() > 0, "must be greater than zero",
52 maxThreadCountJmxAttribute);
56 public java.lang.AutoCloseable createInstance() {
57 return new FlexibleThreadPoolWrapper(getMinThreadCount(), getMaxThreadCount(), getKeepAliveMillis(),
58 TimeUnit.MILLISECONDS, getThreadFactoryDependency());