Add blueprint wiring for netty configs
[controller.git] / opendaylight / config / netty-timer-config / src / main / resources / org / opendaylight / blueprint / netty-timer.xml
diff --git a/opendaylight/config/netty-timer-config/src/main/resources/org/opendaylight/blueprint/netty-timer.xml b/opendaylight/config/netty-timer-config/src/main/resources/org/opendaylight/blueprint/netty-timer.xml
new file mode 100644 (file)
index 0000000..60822d5
--- /dev/null
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+           xmlns:odl="http://opendaylight.org/xmlns/blueprint/v1.0.0"
+           xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
+    odl:restart-dependents-on-updates="true">
+
+  <cm:property-placeholder persistent-id="org.opendaylight.netty.timer" update-strategy="none">
+    <cm:default-properties>
+      <cm:property name="tick-duration" value="0"/>
+      <cm:property name="ticks-per-wheel" value="0"/>
+    </cm:default-properties>
+  </cm:property-placeholder>
+
+  <bean id="timer" class="org.opendaylight.controller.config.yang.netty.timer.HashedWheelTimerCloseable"
+          factory-method="newInstance">
+    <argument><null/></argument> <!-- ThreadFactory -->
+    <argument value="${tick-duration}"/>
+    <argument value="${ticks-per-wheel}"/>
+  </bean>
+
+  <service ref="timer" interface="io.netty.util.Timer" odl:type="global-timer"/>
+
+</blueprint>