diff options
Diffstat (limited to 'examples/java/com/wiredtiger/examples/ex_async.java')
-rw-r--r-- | examples/java/com/wiredtiger/examples/ex_async.java | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/java/com/wiredtiger/examples/ex_async.java b/examples/java/com/wiredtiger/examples/ex_async.java index f99fe8af622..a822b5b8ea9 100644 --- a/examples/java/com/wiredtiger/examples/ex_async.java +++ b/examples/java/com/wiredtiger/examples/ex_async.java @@ -60,6 +60,7 @@ class AsyncKeys implements AsyncCallback { long id = op.getId(); /*! [async get identifier] */ + /* If doing a search, retrieve the key/value pair. */ if (optype == AsyncOpType.WT_AOP_SEARCH) { /*! [async get the operation's string key] */ String key = op.getKeyString(); @@ -73,10 +74,6 @@ class AsyncKeys implements AsyncCallback { System.out.println("Id " + id + " got record: " + key + " : " + value); } - else { - notifyError("unexpected optype"); - ret = 1; - } } catch (Exception e) { System.err.println("ERROR: exception in notify: " + e.toString() + @@ -209,15 +206,16 @@ public class ex_async { return (ret); } - public static int + public static void main(String[] argv) { try { - return (asyncExample()); + System.exit(asyncExample()); } catch (WiredTigerException wte) { System.err.println("Exception: " + wte); - return (-1); + wte.printStackTrace(); + System.exit(1); } } } |