Skip to content

Commit

Permalink
Change grpc version to 1.64 to be consistent with stubs.
Browse files Browse the repository at this point in the history
Put info in AsyncPutGet.
Fix compile error in InfoCommandProxy.
  • Loading branch information
BrianNichols committed Jul 3, 2024
1 parent cda0148 commit 14c64d1
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
26 changes: 26 additions & 0 deletions examples/src/com/aerospike/examples/AsyncPutGet.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,53 @@

import java.io.IOException;
import java.net.ConnectException;
import java.util.Map;

import com.aerospike.client.AerospikeException;
import com.aerospike.client.Bin;
import com.aerospike.client.IAerospikeClient;
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 {
/**
* Asynchronously write and read a bin using alternate methods.
*/
@Override
public void runExample(IAerospikeClient client, EventLoop eventLoop) {
InfoListener listener = new InfoListener() {
@Override
public void onSuccess(Map<String, String> 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.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

<netty.version>4.1.108.Final</netty.version>
<netty.tcnative.version>2.0.62.Final</netty.tcnative.version>
<grpc.version>1.59.0</grpc.version>
<grpc.version>1.64.0</grpc.version>
<luaj-jse.version>3.0.1</luaj-jse.version>
<jbcrypt.version>0.4</jbcrypt.version>
<commons-cli.version>1.7.0</commons-cli.version>
Expand Down
1 change: 0 additions & 1 deletion proxy/src/com/aerospike/client/proxy/InfoCommandProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ void onFailure(AerospikeException ae) {

}

@Override
void onFailure(Throwable t) {
AerospikeException ae;

Expand Down

0 comments on commit 14c64d1

Please sign in to comment.