Skip to content

Commit

Permalink
feature: support hlen protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
funky-eyes committed Apr 18, 2024
1 parent f1ec469 commit b72ec1f
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,24 @@ public HLenRequestProcessor() {
@Override
public void handle(RemotingContext ctx, HLenRequest request) {
Key key = new Key(AeroSpikeClientFactory.namespace, AeroSpikeClientFactory.set, request.getKey());
client.execute(AeroSpikeClientFactory.eventLoops.next(), new ExecuteListener() {
Object object = client.execute(client.getWritePolicyDefault(), key, "hlen", "hash_count_bins");
logger.info("hlen object:{}", object);
request.setResponse(object.toString());
logger.info("hlen response:{}", request);
write(ctx, request);
/*client.execute(AeroSpikeClientFactory.eventLoops.next(), new ExecuteListener() {
@Override
public void onSuccess(Key key, Object obj) {
logger.info("hlen response:{}", request);
request.setResponse(obj.toString());
write(ctx, request);
}

@Override
public void onFailure(AerospikeException exception) {
logger.error(exception.getMessage(), exception);
write(ctx, request);
}
}, client.getWritePolicyDefault(), key, "hlen", "hash_count_bins");
}, client.getWritePolicyDefault(), key, "hlen", "hash_count_bins");*/
}
}

0 comments on commit b72ec1f

Please sign in to comment.