BUG-1787: cleanup AsyncNotifyingListenableFutureTask 85/10985/3
authorRobert Varga <rovarga@cisco.com>
Wed, 10 Sep 2014 10:42:06 +0000 (12:42 +0200)
committerRobert Varga <rovarga@cisco.com>
Wed, 10 Sep 2014 15:04:29 +0000 (17:04 +0200)
commit582c7ee3017a5c514b48a3779da40d6ef652c41e
treea530105ff4c0496d14649a01ff081cd6915d3c64
parente2c0a2ad1e3db5463881e3ffea285f4e33a7b216
BUG-1787: cleanup AsyncNotifyingListenableFutureTask

First move the 'listenerExecutor != null' case into a subclass,
replacing the check with proper OOP override.

Second switch to using SettableBoolean, so we bypass the need to use
ThreadLocal.set/remove in fast path. Also introduce an explicit remove
method, which can be used to cleanup the thread-local state (which was
not previously possible).

Change-Id: I6e68cb1ca791c3ea721cb3379a1e8aa6724ab9b8
Signed-off-by: Robert Varga <rovarga@cisco.com>
common/util/src/main/java/org/opendaylight/yangtools/util/concurrent/AsyncNotifyingListenableFutureTask.java