BUG-1120: expose AbstractRegistration state 68/7568/2
authorRobert Varga <rovarga@cisco.com>
Sun, 1 Jun 2014 13:31:26 +0000 (15:31 +0200)
committerRobert Varga <rovarga@cisco.com>
Sun, 1 Jun 2014 17:41:35 +0000 (19:41 +0200)
commitb002ad53d2910a5dd7f62dd48c8c14a4fc959fa2
treee5e1f748bac60511fc8f6bbe3aa67d25d3aa4961
parentb3e9bdc78ca793648a8cc69b68af0c7f46727cd4
BUG-1120: expose AbstractRegistration state

This patch allows subclasses to infer whether the registration has been
closed.  At the same time we optimize the memory overhead associated with
each instance by not using an AtomicBoolean, but rather a componation of
a volatile int and an AtomicIntegerFieldUpdater.

Change-Id: I672216939f002e42dddef8e6fea73ef8cd109788
Signed-off-by: Robert Varga <rovarga@cisco.com>
common/concepts/src/main/java/org/opendaylight/yangtools/concepts/AbstractRegistration.java
common/concepts/src/main/java/org/opendaylight/yangtools/concepts/ListenerRegistration.java