Bug 930 - Add bound to queue in SingletonHandler#NOTIFICATION_EXECUTOR . 18/6618/1
authorTomas Olvecky <tolvecky@cisco.com>
Wed, 30 Apr 2014 10:36:49 +0000 (12:36 +0200)
committerTomas Olvecky <tolvecky@cisco.com>
Wed, 30 Apr 2014 10:36:49 +0000 (12:36 +0200)
commit8e654401ca264098b4bcfb25fe1411caed10ebe2
tree092d765d2af21ae1b2bc0e4f69532ae07921976c
parent87837c5398976e1f44418e9f161efea9d5fa4e7c
Bug 930 - Add bound to queue in SingletonHandler#NOTIFICATION_EXECUTOR .

Add queue capacity with hardcoded value 10. When maxPoolSize + queue capacity
is reached, caller thread will be blocked.
Mark thread as interrupted when catching InterruptedException, propagate it
to caller.
Remove code that pushed first two runnables to queue when core size was
reached - saturate whole threadpool capacity first.

Change-Id: I9c52b52eac127bea0cbb2abf7a65c0165daf8895
Signed-off-by: Tomas Olvecky <tolvecky@cisco.com>
opendaylight/md-sal/sal-binding-broker/src/main/java/org/opendaylight/controller/sal/binding/codegen/impl/SingletonHolder.java
opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/sal/binding/codegen/impl/SingletonHolderTest.java [new file with mode: 0644]