Closed xaviarias closed 9 years ago
This is technically possible today, by calling getPublishExecutor
on the client and then casting it to an ExecutorService
. You can see an example of this here: https://github.com/keenlabs/KeenClient-Java-Sample/blob/master/src/main/java/io/keen/sample/java/Main.java#L151
It's unfortunately slightly brittle as we don't technically guarantee that the publish executor will be an ExecutorService
in future versions of the SDK, but it should be pretty reliable for now. Does that satisfy your use case?
Sorry I had not seen this method ! This is exactly what I was looking for, thanks.
The class
KeenClient
allows to add events asynchronously with theaddEventAsync
methods. However, there is no way to know if the KeenClient is still processing tasks.Could you add a method that awaits for task finalization, or a method to know if the task queue is empty?