Here are the examples of the java api class org.apache.activemq.artemis.core.journal.IOCompletion taken from open source projects.
1. JDBCJournalTest#testCallbacks()
Project: activemq-artemis
File: JDBCJournalTest.java
File: JDBCJournalTest.java
@Test public void testCallbacks() throws Exception { final int noRecords = 10; final CountDownLatch done = new CountDownLatch(noRecords); IOCompletion completion = new IOCompletion() { @Override public void storeLineUp() { } @Override public void done() { done.countDown(); } @Override public void onError(int errorCode, String errorMessage) { } }; for (int i = 0; i < noRecords; i++) { journal.appendAddRecord(1, (byte) 1, new FakeEncodingSupportImpl(new byte[0]), true, completion); } journal.sync(); done.await(5, TimeUnit.SECONDS); assertEquals(done.getCount(), 0); }