diff --git a/examples/src/com/aerospike/examples/AsyncPutGet.java b/examples/src/com/aerospike/examples/AsyncPutGet.java index 405a12494..ffe0ddfd9 100644 --- a/examples/src/com/aerospike/examples/AsyncPutGet.java +++ b/examples/src/com/aerospike/examples/AsyncPutGet.java @@ -18,6 +18,7 @@ import java.io.IOException; import java.net.ConnectException; +import java.util.Map; import com.aerospike.client.AerospikeException; import com.aerospike.client.Bin; @@ -25,8 +26,10 @@ import com.aerospike.client.Key; import com.aerospike.client.Record; import com.aerospike.client.async.EventLoop; +import com.aerospike.client.listener.InfoListener; import com.aerospike.client.listener.RecordListener; import com.aerospike.client.listener.WriteListener; +import com.aerospike.client.policy.InfoPolicy; public class AsyncPutGet extends AsyncExample { /** @@ -34,11 +37,34 @@ public class AsyncPutGet extends AsyncExample { */ @Override public void runExample(IAerospikeClient client, EventLoop eventLoop) { + InfoListener listener = new InfoListener() { + @Override + public void onSuccess(Map map) { + System.out.println("Success"); + for (String cmd: map.keySet()){ + System.out.println("Command: "+cmd+" Output: "+map.get(cmd)); + } + } + @Override + public void onFailure(AerospikeException e) { + System.err.println("Info command failed: " + e.getMessage()); + } + }; + + String[] commands = new String[] { "build" }; + + InfoPolicy infoPolicy = new InfoPolicy(); + infoPolicy.setTimeout(5000); + + System.out.println("Call async info"); + client.info(eventLoop, listener, infoPolicy, null, commands); + /* Key key = new Key(params.namespace, params.set, "putgetkey"); Bin bin = new Bin("putgetbin", "value"); runPutGetInline(client, eventLoop, key, bin); runPutGetWithRetry(client, eventLoop, key, bin); + */ } // Inline asynchronous put/get calls. diff --git a/pom.xml b/pom.xml index 6c462c20b..0775371bc 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ 4.1.108.Final 2.0.62.Final - 1.59.0 + 1.64.0 3.0.1 0.4 1.7.0 diff --git a/proxy/src/com/aerospike/client/proxy/InfoCommandProxy.java b/proxy/src/com/aerospike/client/proxy/InfoCommandProxy.java index 9daad38fe..bc82cc1b6 100644 --- a/proxy/src/com/aerospike/client/proxy/InfoCommandProxy.java +++ b/proxy/src/com/aerospike/client/proxy/InfoCommandProxy.java @@ -100,7 +100,6 @@ void onFailure(AerospikeException ae) { } - @Override void onFailure(Throwable t) { AerospikeException ae;