Skip to content

Commit

Permalink
Add getter for record field of RecordSet and RecordSequenceRecordSet
Browse files Browse the repository at this point in the history
  • Loading branch information
agrgr committed Mar 28, 2024
1 parent 0c77b29 commit 343aeb3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 8 additions & 1 deletion client/src/com/aerospike/client/query/RecordSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,13 @@ public Record getRecord() {
return record.record;
}

/**
* Get KeyRecord.
*/
public KeyRecord getKeyRecord() {
return record;
}

//-------------------------------------------------------
// Methods for internal use only.
//-------------------------------------------------------
Expand Down Expand Up @@ -206,7 +213,7 @@ public boolean hasNext() {

@Override
public KeyRecord next() {
KeyRecord kr = recordSet.record;
KeyRecord kr = recordSet.getKeyRecord();
more = recordSet.next();
return kr;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class RecordSequenceRecordSet extends RecordSet implements RecordSequence
private final long taskId;
private volatile boolean valid = true;
private final BlockingQueue<KeyRecord> queue;
private volatile KeyRecord record;
protected volatile KeyRecord record;
private volatile AerospikeException exception;

public RecordSequenceRecordSet(long taskId, int capacity) {
Expand Down Expand Up @@ -109,6 +109,11 @@ public Record getRecord() {
return record.record;
}

@Override
public KeyRecord getKeyRecord() {
return record;
}

@Override
public Key getKey() {
return record.key;
Expand Down

0 comments on commit 343aeb3

Please sign in to comment.