forked from opensearch-project/data-prepper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ProgressCheck callbacks to end-to-end acknowledgements (opensearc…
…h-project#3565) Add ProgressCheck callbacks to end-to-end acknowledgements Signed-off-by: Krishna Kondaka <[email protected]> Co-authored-by: Krishna Kondaka <[email protected]>
- Loading branch information
Showing
16 changed files
with
547 additions
and
59 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
17 changes: 17 additions & 0 deletions
17
...er-api/src/main/java/org/opensearch/dataprepper/model/acknowledgements/ProgressCheck.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,17 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.model.acknowledgements; | ||
|
||
public interface ProgressCheck { | ||
/** | ||
* Returns the pending ratio | ||
* | ||
* @return returns the ratio of pending to the total acknowledgements | ||
* @since 2.6 | ||
*/ | ||
Double getRatio(); | ||
} | ||
|
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
21 changes: 21 additions & 0 deletions
21
...-core/src/main/java/org/opensearch/dataprepper/acknowledgements/DefaultProgressCheck.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,21 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.dataprepper.acknowledgements; | ||
|
||
import org.opensearch.dataprepper.model.acknowledgements.ProgressCheck; | ||
|
||
public class DefaultProgressCheck implements ProgressCheck { | ||
double ratio; | ||
|
||
public DefaultProgressCheck(double ratio) { | ||
this.ratio = ratio; | ||
} | ||
|
||
@Override | ||
public Double getRatio() { | ||
return ratio; | ||
} | ||
} |
Oops, something went wrong.