On 12/13/17 2:23 AM, Shafi Ahmad wrote:
Thank you Mandy and David for review comments.
Please find updated webrev:
http://cr.openjdk.java.net/~shshahma/8170299/webrev.03/
<http://cr.openjdk.java.net/%7Eshshahma/8170299/webrev.03/>
I have modify the code to use Emitter class rather than Broadcaster.
It's good that this version does not need the new public API.
The thread factory can be lazily created in the first time to handle a
notification. I think this fix can be made simpler for example, you can
add a ListenerInfo::handle method to replace SendNotifJob and the new
protected handleNotification method.
if (li.filter == null ||
li.filter.isNotificationEnabled(notification)) {
NotificationThread.execute(() -> li.handle(notification));
}
The static Executor field can be moved to NotificationThread (was
NotificationThreadFactory) class so that it will be lazily initialized
only when there is a notification.
Mandy