Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLIENT-2843 Add getter for record field of RecordSet and RecordSequenceRecordSet #311

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading