Bug 930 - Add bound to queue in SingletonHandler#NOTIFICATION_EXECUTOR .
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)
commit8314d50d2830b0d929d0b0be4561c26d8b15b564
tree85fd25969d5f58d9da130cae20ce0aaaeb056cbd
parent5683c46a56ba3669f8bba1cf3cec175d62666a4f
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]