mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-08 21:30:57 +00:00
Added comments for new receiver callback
This commit is contained in:
1 parent
14a403ccb6
commit
7cb3e8d4ef
2 files changed
+24
No files matched your search
+9
@@ -1,7 +1,16 @@
|
||||
package com.sap.sailing.domain.tractracadapter;
|
||||
|
||||
import com.sap.sailing.domain.tractracadapter.impl.AbstractReceiverWithQueue;
|
||||
import com.sap.sailing.domain.tractracadapter.impl.TracTracRaceTrackerImpl;
|
||||
|
||||
public interface LoadingQueueDoneCallBack {
|
||||
|
||||
/**
|
||||
* Callback method
|
||||
* See {@link AbstractReceiverWithQueue} and {@link TracTracRaceTrackerImpl} for example usage.
|
||||
*
|
||||
* @param receiver Receiver that handled the marked event.
|
||||
*/
|
||||
void loadingQueueDone(Receiver receiver);
|
||||
|
||||
}
|
||||
+15
@@ -1,5 +1,9 @@
|
||||
package com.sap.sailing.domain.tractracadapter;
|
||||
|
||||
import com.sap.sailing.domain.tracking.TrackedRace;
|
||||
import com.sap.sailing.domain.tracking.TrackedRaceStatus;
|
||||
import com.sap.sailing.domain.tractracadapter.impl.TracTracRaceTrackerImpl;
|
||||
|
||||
|
||||
public interface Receiver {
|
||||
/**
|
||||
@@ -35,5 +39,16 @@ public interface Receiver {
|
||||
*/
|
||||
void join(long timeoutInMilliseconds) throws InterruptedException;
|
||||
|
||||
/**
|
||||
* Allows to "mark" the currently last event in the queue and provides callback as soon as this event has been handled.
|
||||
*
|
||||
* This is used in {@link TracTracRaceTrackerImpl} to ensure that queued events during loading phase will be processed
|
||||
* before the new {@link TrackedRaceStatus} is propagated to the {@link TrackedRace}.
|
||||
*
|
||||
* @param callback
|
||||
* {@link LoadingQueueDoneCallBack#loadingQueueDone(Receiver)} Will be called as soon as the event that
|
||||
* was last in the queue at the time of calling
|
||||
* {@link #callBackWhenLoadingQueueIsDone(LoadingQueueDoneCallBack)} has been handled.
|
||||
*/
|
||||
void callBackWhenLoadingQueueIsDone(LoadingQueueDoneCallBack callback);
|
||||
}
|
||||
Reference in new issue
Block a user