spring-projects / spring-projects/spring-data-keyvalue
Add support for putIfAbsent to KeyValueAdapter
Open
Nobody has claimed this yet.
type: enhancement
- Dominant language
- Java
- Stars
- 157
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
public interface KeyValueAdapter ... {
/**
* Add object with given id to keyspace.
*
* @param id must not be {@literal null}.
* @param keyspace must not be {@literal null}.
* @return the item previously associated with the id.
*/
@Nullable Object putIfAbsent(Object id, Object item, String keyspace);
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the KeyValueAdapter interface and inspect how its existing operations are implemented by the repository's key-value adapters. Trace the expected behavior of the proposed putIfAbsent signature and add coverage for the previously associated item and absent-item cases; done means supported adapters expose consistent behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100