From 343aeb3e06fa64d4e51ad2605f157004bcb52d2c Mon Sep 17 00:00:00 2001 From: agrgr Date: Thu, 28 Mar 2024 14:38:46 +0200 Subject: [PATCH] Add getter for record field of RecordSet and RecordSequenceRecordSet --- client/src/com/aerospike/client/query/RecordSet.java | 9 ++++++++- .../aerospike/client/proxy/RecordSequenceRecordSet.java | 7 ++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/client/src/com/aerospike/client/query/RecordSet.java b/client/src/com/aerospike/client/query/RecordSet.java index ad36a5e65..9a4a0a348 100644 --- a/client/src/com/aerospike/client/query/RecordSet.java +++ b/client/src/com/aerospike/client/query/RecordSet.java @@ -131,6 +131,13 @@ public Record getRecord() { return record.record; } + /** + * Get KeyRecord. + */ + public KeyRecord getKeyRecord() { + return record; + } + //------------------------------------------------------- // Methods for internal use only. //------------------------------------------------------- @@ -206,7 +213,7 @@ public boolean hasNext() { @Override public KeyRecord next() { - KeyRecord kr = recordSet.record; + KeyRecord kr = recordSet.getKeyRecord(); more = recordSet.next(); return kr; } diff --git a/proxy/src/com/aerospike/client/proxy/RecordSequenceRecordSet.java b/proxy/src/com/aerospike/client/proxy/RecordSequenceRecordSet.java index 0da743a84..4e997c584 100644 --- a/proxy/src/com/aerospike/client/proxy/RecordSequenceRecordSet.java +++ b/proxy/src/com/aerospike/client/proxy/RecordSequenceRecordSet.java @@ -34,7 +34,7 @@ public class RecordSequenceRecordSet extends RecordSet implements RecordSequence private final long taskId; private volatile boolean valid = true; private final BlockingQueue queue; - private volatile KeyRecord record; + protected volatile KeyRecord record; private volatile AerospikeException exception; public RecordSequenceRecordSet(long taskId, int capacity) { @@ -109,6 +109,11 @@ public Record getRecord() { return record.record; } + @Override + public KeyRecord getKeyRecord() { + return record; + } + @Override public Key getKey() { return record.key;