Created
May 5, 2016 17:17
-
-
Save gmucha/f96600fcfae2f5c5501f0699ade0a838 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void addCallback(KairosTableRow<C, V, K> tableRow, FutureCallback<ResultSet> callback) | |
{ | |
bufferCounter.incrementAndGet(); | |
executorService.submit(() -> { | |
bufferCounter.decrementAndGet(); | |
baseKairosTableRepository.addCallback(tableRow, new FutureCallback<ResultSet>() | |
{ | |
@Override | |
public void onSuccess(@Nullable ResultSet result) | |
{ | |
callback.onSuccess(result); | |
} | |
@Override | |
public void onFailure(Throwable t) | |
{ | |
if (t instanceof InvalidQueryException) { | |
LOG.error("Invalid query, skipping.", t); | |
} else { | |
addCallback(tableRow, callback); | |
} | |
callback.onFailure(t); | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment