Skip to content

Commit

Permalink
[TH2-5063] refactored after review
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikita-Smirnov-Exactpro committed Oct 16, 2023
1 parent 849743f commit 6dadcf6
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions src/main/java/com/exactpro/th2/estore/EventProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -109,15 +109,6 @@ public void close() {
}
}


private void checkAndRespond(AtomicBoolean responded, Supplier<Boolean> confirmationFunction) {
synchronized(responded) {
if (!responded.get())
responded.set(confirmationFunction.get());
}
}


private void storeSingleEvents(List<Event> events, Confirmation confirmation) {

Callback<TestEventToStore> persistorCallback = new ProcessorCallback(confirmation, events.size());
Expand Down Expand Up @@ -257,5 +248,12 @@ public void onFail(TestEventToStore persistedEvent) {
completed.put(persistedEvent, persistedEvent);
}
}

private void checkAndRespond(AtomicBoolean responded, Supplier<Boolean> confirmationFunction) {
synchronized(responded) {
if (!responded.get())
responded.set(confirmationFunction.get());
}
}
}
}

0 comments on commit 6dadcf6

Please sign in to comment.