Skip to content

Instantly share code, notes, and snippets.

@msavy
Created August 13, 2015 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msavy/8f72fbaca9be0866c73d to your computer and use it in GitHub Desktop.
Save msavy/8f72fbaca9be0866c73d to your computer and use it in GitHub Desktop.
private BlockingMetricsPushingThing blockingMetricsPusher = ...;
private Vertx vertx;
void collectData(Metrics frequentData) {
vertx.executeBlocking(future -> {
blockingMetricsPusher.push(frequentData); // e.g. this might happen once per request-response cycle in an HTTP client. So very high volume.
}, this::resultHandler)
blockingMetricsThing
}
void resultHandler() { ... }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment