Skip to content

Commit

Permalink
Added Progress Check interface and test files
Browse files Browse the repository at this point in the history
Signed-off-by: Krishna Kondaka <[email protected]>
  • Loading branch information
Krishna Kondaka committed Nov 3, 2023
1 parent 740cb4b commit d3bfac4
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
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();
}

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;
}
}

0 comments on commit d3bfac4

Please sign in to comment.