Skip to content

Questions about durability with scopes and collections #1329

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

Closed
jorgerod opened this issue Feb 9, 2022 · 0 comments · Fixed by #1340
Closed

Questions about durability with scopes and collections #1329

jorgerod opened this issue Feb 9, 2022 · 0 comments · Fixed by #1340
Labels
type: bug A general bug

Comments

@jorgerod
Copy link
Contributor

jorgerod commented Feb 9, 2022

Hello

I've been looking at the added feature of scopes and collections and I've seen an issue that I don't know if it's correct.

  • This methods of interfaces {Operation}ByIdWithDurability return {Operation}ByIdInScope:

interface UpsertByIdWithDurability<T> extends UpsertByIdInScope<T>, WithDurability<T> {
@Override
UpsertByIdInScope<T> withDurability(DurabilityLevel durabilityLevel);
@Override
UpsertByIdInScope<T> withDurability(PersistTo persistTo, ReplicateTo replicateTo);

interface ReplaceByIdWithDurability<T> extends ReplaceByIdInScope<T>, WithDurability<T> {
@Override
ReplaceByIdInScope<T> withDurability(DurabilityLevel durabilityLevel);
@Override
ReplaceByIdInScope<T> withDurability(PersistTo persistTo, ReplicateTo replicateTo);
}

  • and this methods return {Operation}ByInCollection:

interface InsertByIdWithDurability<T> extends InsertByIdInScope<T>, WithDurability<T> {
@Override
InsertByIdInCollection<T> withDurability(DurabilityLevel durabilityLevel);
@Override
InsertByIdInCollection<T> withDurability(PersistTo persistTo, ReplicateTo replicateTo);

interface UpsertByIdWithDurability<T> extends UpsertByIdInScope<T>, WithDurability<T> {
@Override
UpsertByIdInCollection<T> withDurability(DurabilityLevel durabilityLevel);
@Override
UpsertByIdInCollection<T> withDurability(PersistTo persistTo, ReplicateTo replicateTo);

interface ReplaceByIdWithDurability<T> extends ReplaceByIdInScope<T>, WithDurability<T> {
ReplaceByIdInCollection<T> withDurability(DurabilityLevel durabilityLevel);
ReplaceByIdInCollection<T> withDurability(PersistTo persistTo, ReplicateTo replicateTo);
}

interface InsertByIdWithDurability<T> extends InsertByIdInScope<T>, WithDurability<T> {
@Override
InsertByIdInCollection<T> withDurability(DurabilityLevel durabilityLevel);
@Override
InsertByIdInCollection<T> withDurability(PersistTo persistTo, ReplicateTo replicateTo);

interface RemoveByIdWithDurability extends RemoveByIdInScope, WithDurability<RemoveResult> {
@Override
RemoveByIdInCollection withDurability(DurabilityLevel durabilityLevel);
@Override
RemoveByIdInCollection withDurability(PersistTo persistTo, ReplicateTo replicateTo);

interface RemoveByIdWithDurability extends RemoveByIdInScope, WithDurability<RemoveResult> {
@Override
RemoveByIdInCollection withDurability(DurabilityLevel durabilityLevel);
@Override
RemoveByIdInCollection withDurability(PersistTo persistTo, ReplicateTo replicateTo);

I think the correct thing to do would be for those methods to return {Operation}ByInScope because then we could do .withDurability().withScope("").withCollection("")

How do you see it?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 9, 2022
@mikereiche mikereiche added the type: bug A general bug label Feb 10, 2022
@mikereiche mikereiche added this to the 4.3.2 (2021.1.2) milestone Feb 10, 2022
mikereiche added a commit that referenced this issue Feb 11, 2022
Some of the operations were mistakenly declared to return a
WithCollection type, making it impossible to call the inScope()
method.

Closes #1329.
@mikereiche mikereiche removed the status: waiting-for-triage An issue we've not yet triaged label Feb 11, 2022
mikereiche added a commit that referenced this issue Feb 11, 2022
Some of the operations were mistakenly declared to return a
WithCollection type, making it impossible to call the inScope()
method.

Closes #1329.
mikereiche added a commit that referenced this issue Feb 16, 2022
Some of the operations were mistakenly declared to return a
WithCollection type, making it impossible to call the inScope()
method.

Closes #1329.
mikereiche added a commit that referenced this issue Feb 16, 2022
Some of the operations were mistakenly declared to return a
WithCollection type, making it impossible to call the inScope()
method.

Closes #1329.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
3 participants