public void getEventsForJob ( final JobID jobID , final List < AbstractEvent > eventList , final boolean includeManagementEvents ) { synchronized ( this . collectedEvents ) { List < AbstractEvent > eventsForJob = this . collectedEvents . get ( jobID ) ; if ( eventsForJob != null ) { final Iterator < AbstractEvent > it = eventsForJob . iterator ( ) ; while ( it . hasNext ( ) ) { final AbstractEvent event = it . next ( ) ; final boolean isManagementEvent = ( event instanceof ManagementEvent ) ; if ( ! isManagementEvent || includeManagementEvents ) { eventList . add ( event ) ; } } } } }
Retrieves and adds the collected events for the job with the given job ID to the provided list .