9. Other API
Flush
OperationFuture<Boolean> flush(String prefix)OperationFuture<Boolean> future = null;
try {
future = client.flush(“myprefix”);
boolean result = future.get(1000L, TimeUnit.MILLISECONDS);
System.out.println(result);
} catch (InterruptedException e) {
future.cancel(true);
} catch (TimeoutException e) {
future.cancel(true);
} catch (ExecutionException e) {
future.cancel(true);
}Last updated