diff --git a/src/main/java/com/basho/riak/client/api/commands/kv/KvResponseBase.java b/src/main/java/com/basho/riak/client/api/commands/kv/KvResponseBase.java index a2998ce98..d57adcca6 100644 --- a/src/main/java/com/basho/riak/client/api/commands/kv/KvResponseBase.java +++ b/src/main/java/com/basho/riak/client/api/commands/kv/KvResponseBase.java @@ -47,6 +47,14 @@ protected KvResponseBase(Init builder) this.values = builder.values; } + /** + * Returns the {@link Location} affected by the operation that resulted in this response. + * @return the affected {@link Location} + */ + public Location getLocation() { + return location; + } + /** * Determine if this response contains any returned values. * @return true if values are present, false otherwise. diff --git a/src/test/java/com/basho/riak/client/api/commands/itest/ITestFetchValue.java b/src/test/java/com/basho/riak/client/api/commands/itest/ITestFetchValue.java index 992a5fd29..deebefdac 100644 --- a/src/test/java/com/basho/riak/client/api/commands/itest/ITestFetchValue.java +++ b/src/test/java/com/basho/riak/client/api/commands/itest/ITestFetchValue.java @@ -229,6 +229,8 @@ private void resolveSiblings(Namespace ns, ConflictResolver resolver) thro assertEquals(pojo.value, fResp.getValues(converter).get(0).value); assertEquals(pojo.value, fResp.getValue(converter, resolver).value); assertEquals(pojo.value, fResp.getValue(pojoTypeRef).value); + + assertEquals(loc, fResp.getLocation()); } private Pojo storeSiblings(Location loc) throws ExecutionException, InterruptedException