use of org.eclipse.tracecompass.internal.tmf.core.request.TmfCoalescedEventRequest in project tracecompass by tracecompass.
the class TmfEventProvider method fireRequest.
private void fireRequest(boolean isTimeout) {
synchronized (fLock) {
if (fRequestPendingCounter > 0) {
return;
}
if (!fPendingCoalescedRequests.isEmpty()) {
Iterator<TmfCoalescedEventRequest> iter = fPendingCoalescedRequests.iterator();
while (iter.hasNext()) {
ExecutionType type = (isTimeout ? ExecutionType.BACKGROUND : ExecutionType.FOREGROUND);
ITmfEventRequest request = iter.next();
if (type == request.getExecType()) {
queueRequest(request);
iter.remove();
}
}
}
}
}
use of org.eclipse.tracecompass.internal.tmf.core.request.TmfCoalescedEventRequest in project tracecompass by tracecompass.
the class TmfEventProvider method newCoalescedEventRequest.
// ------------------------------------------------------------------------
// Coalescing
// ------------------------------------------------------------------------
/**
* Create a new request from an existing one, and add it to the coalesced
* requests
*
* @param request
* The request to copy
*/
protected void newCoalescedEventRequest(ITmfEventRequest request) {
synchronized (fLock) {
TmfCoalescedEventRequest coalescedRequest = new TmfCoalescedEventRequest(request.getDataType(), request.getRange(), request.getIndex(), request.getNbRequested(), request.getExecType(), request.getDependencyLevel());
coalescedRequest.addRequest(request);
coalescedRequest.setProviderFilter(this);
if (TmfCoreTracer.isRequestTraced()) {
// $NON-NLS-1$
TmfCoreTracer.traceRequest(request.getRequestId(), "COALESCED with " + coalescedRequest.getRequestId());
// $NON-NLS-1$
TmfCoreTracer.traceRequest(coalescedRequest.getRequestId(), "now contains " + coalescedRequest.getSubRequestIds());
}
coalesceChildrenRequests(coalescedRequest);
fPendingCoalescedRequests.add(coalescedRequest);
}
}
Aggregations