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

FMWK-48 Spring Data Aerospike Cacheable sync option #755

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

agrgr
Copy link

@agrgr agrgr commented Jun 18, 2024

No description provided.

@agrgr agrgr requested review from roimenashe and reugn June 18, 2024 09:46
@agrgr agrgr marked this pull request as ready for review June 18, 2024 10:04
@@ -112,20 +112,48 @@ public Object getNativeCache() {
* @return The value (bins) to which this cache maps the specified key.
*/
@Override
@SuppressWarnings({"unchecked", "NullableProblems"})
@SuppressWarnings({"NullableProblems"})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@SuppressWarnings({"NullableProblems"})
@SuppressWarnings("NullableProblems")

}
}
return value;
if (record.getValue(VALUE) != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

record or valueLoader can be null here.

AerospikeReadData data = AerospikeReadData.forRead(dbKey, record);
Class<T> type = getValueType(valueLoader); // determine the class of T
return aerospikeConverter.read(type, data);
} else {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for else.

Comment on lines 117 to 118
Key dbKey = getKey(key);
Record record = client.get(null, dbKey);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should go under the following if.

}
} catch (Exception e) {
throw new Cache.ValueRetrievalException(key, valueLoader, e);
} else if (record.getValue(VALUE) != null) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} else if (record.getValue(VALUE) != null) {
}
if (record.getValue(VALUE) != null) {

@agrgr agrgr merged commit 4f1c727 into main Jun 18, 2024
7 checks passed
@agrgr agrgr deleted the FMWK-48-support-sync-Cacheable branch June 18, 2024 15:16
@agrgr agrgr linked an issue Jun 24, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support sync property in @Cacheable annotation
3 participants