-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No error/warning on failed snapshot deletion #10676
- Loading branch information
1 parent
d7f125d
commit 01f1ad8
Showing
7 changed files
with
114 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
modules/core/core-api/src/main/java/com/enonic/xp/node/RemoveSnapshotsResult.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package com.enonic.xp.node; | ||
|
||
import java.util.Set; | ||
|
||
import com.google.common.collect.ImmutableSet; | ||
|
||
import com.enonic.xp.annotation.PublicApi; | ||
|
||
@PublicApi | ||
public final class RemoveSnapshotsResult | ||
{ | ||
private final Set<String> snapshotNames; | ||
|
||
private final Set<String> failedSnapshotNames; | ||
|
||
private RemoveSnapshotsResult( final Builder builder ) | ||
{ | ||
this.snapshotNames = builder.snapshotNames.build(); | ||
this.failedSnapshotNames = builder.failedSnapshotNames.build(); | ||
} | ||
|
||
public Set<String> getSnapshotNames() | ||
{ | ||
return snapshotNames; | ||
} | ||
|
||
public Set<String> getFailedSnapshotNames() | ||
{ | ||
return failedSnapshotNames; | ||
} | ||
|
||
public static Builder create() | ||
{ | ||
return new Builder(); | ||
} | ||
|
||
public static final class Builder | ||
{ | ||
private final ImmutableSet.Builder<String> snapshotNames = ImmutableSet.builder(); | ||
|
||
private final ImmutableSet.Builder<String> failedSnapshotNames = ImmutableSet.builder(); | ||
|
||
public Builder addProcessed( final String snapshotName ) | ||
{ | ||
this.snapshotNames.add( snapshotName ); | ||
return this; | ||
} | ||
|
||
public Builder addFailed( final String snapshotName ) | ||
{ | ||
this.failedSnapshotNames.add( snapshotName ); | ||
return this; | ||
Check warning on line 52 in modules/core/core-api/src/main/java/com/enonic/xp/node/RemoveSnapshotsResult.java Codecov / codecov/patchmodules/core/core-api/src/main/java/com/enonic/xp/node/RemoveSnapshotsResult.java#L51-L52
|
||
} | ||
|
||
public RemoveSnapshotsResult build() | ||
{ | ||
return new RemoveSnapshotsResult( this ); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters