[jira] [Updated] (LENS-1298) Thread should have ability to wait for Events to be processed

2018-01-31 Thread Raju Bairishetti (JIRA)

 [ 
https://issues.apache.org/jira/browse/LENS-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Raju Bairishetti updated LENS-1298:
---
Issue Type: Improvement  (was: New Feature)

> Thread should have ability to wait for Events to be processed
> -
>
> Key: LENS-1298
> URL: https://issues.apache.org/jira/browse/LENS-1298
> Project: Apache Lens
>  Issue Type: Improvement
>Reporter: Lavkesh Lahngir
>Assignee: Lavkesh Lahngir
>Priority: Major
> Fix For: 2.7
>
> Attachments: notifySync.patch, notifysync-bug.patch
>
>
> When a thread notifies event service to process any event, it should have a 
> way to wait for it to be finished.
> {code}
> LensEvent event = new LensEvent();
> synchronized(event) {
>eventservice.notifyEvent(event);
>event.wait();
> }
> {code}
> The EventHandler will do a notifyall() on the event it is done handling. 
> {code}
> public void run() {
>   try {
> Class evtClass = event.getClass();
> // Call listeners directly listening for this event type
> handleEvent(eventListeners.get(evtClass), event);
> Class superClass = evtClass.getSuperclass();
> // Call listeners which listen of super types of this event type
> while (LensEvent.class.isAssignableFrom(superClass)) {
>   if (eventListeners.containsKey(superClass)) {
> handleEvent(eventListeners.get(superClass), event);
>   }
>   superClass = superClass.getSuperclass();
> }
>   } finally {
> synchronized (event) {
>   event.notifyAll();
> }
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (LENS-1298) Thread should have ability to wait for Events to be processed

2016-09-06 Thread Lavkesh Lahngir (JIRA)

 [ 
https://issues.apache.org/jira/browse/LENS-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lavkesh Lahngir updated LENS-1298:
--
Status: Patch Available  (was: Reopened)

> Thread should have ability to wait for Events to be processed
> -
>
> Key: LENS-1298
> URL: https://issues.apache.org/jira/browse/LENS-1298
> Project: Apache Lens
>  Issue Type: New Feature
>Reporter: Lavkesh Lahngir
>Assignee: Lavkesh Lahngir
> Fix For: 2.7
>
> Attachments: notifySync.patch, notifysync-bug.patch
>
>
> When a thread notifies event service to process any event, it should have a 
> way to wait for it to be finished.
> {code}
> LensEvent event = new LensEvent();
> synchronized(event) {
>eventservice.notifyEvent(event);
>event.wait();
> }
> {code}
> The EventHandler will do a notifyall() on the event it is done handling. 
> {code}
> public void run() {
>   try {
> Class evtClass = event.getClass();
> // Call listeners directly listening for this event type
> handleEvent(eventListeners.get(evtClass), event);
> Class superClass = evtClass.getSuperclass();
> // Call listeners which listen of super types of this event type
> while (LensEvent.class.isAssignableFrom(superClass)) {
>   if (eventListeners.containsKey(superClass)) {
> handleEvent(eventListeners.get(superClass), event);
>   }
>   superClass = superClass.getSuperclass();
> }
>   } finally {
> synchronized (event) {
>   event.notifyAll();
> }
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (LENS-1298) Thread should have ability to wait for Events to be processed

2016-09-06 Thread Rajat Khandelwal (JIRA)

 [ 
https://issues.apache.org/jira/browse/LENS-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajat Khandelwal updated LENS-1298:
---
Fix Version/s: 2.7

> Thread should have ability to wait for Events to be processed
> -
>
> Key: LENS-1298
> URL: https://issues.apache.org/jira/browse/LENS-1298
> Project: Apache Lens
>  Issue Type: New Feature
>Reporter: Lavkesh Lahngir
>Assignee: Lavkesh Lahngir
> Fix For: 2.7
>
> Attachments: notifySync.patch
>
>
> When a thread notifies event service to process any event, it should have a 
> way to wait for it to be finished.
> {code}
> LensEvent event = new LensEvent();
> synchronized(event) {
>eventservice.notifyEvent(event);
>event.wait();
> }
> {code}
> The EventHandler will do a notifyall() on the event it is done handling. 
> {code}
> public void run() {
>   try {
> Class evtClass = event.getClass();
> // Call listeners directly listening for this event type
> handleEvent(eventListeners.get(evtClass), event);
> Class superClass = evtClass.getSuperclass();
> // Call listeners which listen of super types of this event type
> while (LensEvent.class.isAssignableFrom(superClass)) {
>   if (eventListeners.containsKey(superClass)) {
> handleEvent(eventListeners.get(superClass), event);
>   }
>   superClass = superClass.getSuperclass();
> }
>   } finally {
> synchronized (event) {
>   event.notifyAll();
> }
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (LENS-1298) Thread should have ability to wait for Events to be processed

2016-09-06 Thread Rajat Khandelwal (JIRA)

 [ 
https://issues.apache.org/jira/browse/LENS-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajat Khandelwal updated LENS-1298:
---
Resolution: Fixed
Status: Resolved  (was: Patch Available)

> Thread should have ability to wait for Events to be processed
> -
>
> Key: LENS-1298
> URL: https://issues.apache.org/jira/browse/LENS-1298
> Project: Apache Lens
>  Issue Type: New Feature
>Reporter: Lavkesh Lahngir
>Assignee: Lavkesh Lahngir
> Fix For: 2.7
>
> Attachments: notifySync.patch
>
>
> When a thread notifies event service to process any event, it should have a 
> way to wait for it to be finished.
> {code}
> LensEvent event = new LensEvent();
> synchronized(event) {
>eventservice.notifyEvent(event);
>event.wait();
> }
> {code}
> The EventHandler will do a notifyall() on the event it is done handling. 
> {code}
> public void run() {
>   try {
> Class evtClass = event.getClass();
> // Call listeners directly listening for this event type
> handleEvent(eventListeners.get(evtClass), event);
> Class superClass = evtClass.getSuperclass();
> // Call listeners which listen of super types of this event type
> while (LensEvent.class.isAssignableFrom(superClass)) {
>   if (eventListeners.containsKey(superClass)) {
> handleEvent(eventListeners.get(superClass), event);
>   }
>   superClass = superClass.getSuperclass();
> }
>   } finally {
> synchronized (event) {
>   event.notifyAll();
> }
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (LENS-1298) Thread should have ability to wait for Events to be processed

2016-09-06 Thread Rajat Khandelwal (JIRA)

 [ 
https://issues.apache.org/jira/browse/LENS-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajat Khandelwal updated LENS-1298:
---
Status: Patch Available  (was: Open)

> Thread should have ability to wait for Events to be processed
> -
>
> Key: LENS-1298
> URL: https://issues.apache.org/jira/browse/LENS-1298
> Project: Apache Lens
>  Issue Type: New Feature
>Reporter: Lavkesh Lahngir
>Assignee: Lavkesh Lahngir
> Attachments: notifySync.patch
>
>
> When a thread notifies event service to process any event, it should have a 
> way to wait for it to be finished.
> {code}
> LensEvent event = new LensEvent();
> synchronized(event) {
>eventservice.notifyEvent(event);
>event.wait();
> }
> {code}
> The EventHandler will do a notifyall() on the event it is done handling. 
> {code}
> public void run() {
>   try {
> Class evtClass = event.getClass();
> // Call listeners directly listening for this event type
> handleEvent(eventListeners.get(evtClass), event);
> Class superClass = evtClass.getSuperclass();
> // Call listeners which listen of super types of this event type
> while (LensEvent.class.isAssignableFrom(superClass)) {
>   if (eventListeners.containsKey(superClass)) {
> handleEvent(eventListeners.get(superClass), event);
>   }
>   superClass = superClass.getSuperclass();
> }
>   } finally {
> synchronized (event) {
>   event.notifyAll();
> }
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (LENS-1298) Thread should have ability to wait for Events to be processed

2016-09-02 Thread Lavkesh Lahngir (JIRA)

 [ 
https://issues.apache.org/jira/browse/LENS-1298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lavkesh Lahngir updated LENS-1298:
--
Attachment: notifySync.patch

> Thread should have ability to wait for Events to be processed
> -
>
> Key: LENS-1298
> URL: https://issues.apache.org/jira/browse/LENS-1298
> Project: Apache Lens
>  Issue Type: New Feature
>Reporter: Lavkesh Lahngir
>Assignee: Lavkesh Lahngir
> Attachments: notifySync.patch
>
>
> When a thread notifies event service to process any event, it should have a 
> way to wait for it to be finished.
> {code}
> LensEvent event = new LensEvent();
> synchronized(event) {
>eventservice.notifyEvent(event);
>event.wait();
> }
> {code}
> The EventHandler will do a notifyall() on the event it is done handling. 
> {code}
> public void run() {
>   try {
> Class evtClass = event.getClass();
> // Call listeners directly listening for this event type
> handleEvent(eventListeners.get(evtClass), event);
> Class superClass = evtClass.getSuperclass();
> // Call listeners which listen of super types of this event type
> while (LensEvent.class.isAssignableFrom(superClass)) {
>   if (eventListeners.containsKey(superClass)) {
> handleEvent(eventListeners.get(superClass), event);
>   }
>   superClass = superClass.getSuperclass();
> }
>   } finally {
> synchronized (event) {
>   event.notifyAll();
> }
>   }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)