forked from opensearch-project/data-prepper
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Duration for delays in RetryInfoConfig for OTelLogsSource
- Loading branch information
1 parent
473db0e
commit 6ef9b7e
Showing
4 changed files
with
19 additions
and
11 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
16 changes: 9 additions & 7 deletions
16
...rce/src/main/java/org/opensearch/dataprepper/plugins/source/otellogs/RetryInfoConfig.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 |
---|---|---|
@@ -1,36 +1,38 @@ | ||
package org.opensearch.dataprepper.plugins.source.otellogs; | ||
|
||
import java.time.Duration; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class RetryInfoConfig { | ||
|
||
@JsonProperty("min_delay") | ||
private Integer minDelay; | ||
private Duration minDelay; | ||
|
||
@JsonProperty("max_delay") | ||
private Integer maxDelay; | ||
private Duration maxDelay; | ||
|
||
// Jackson needs this constructor | ||
public RetryInfoConfig() {} | ||
|
||
public RetryInfoConfig(int minDelay, int maxDelay) { | ||
public RetryInfoConfig(Duration minDelay, Duration maxDelay) { | ||
this.minDelay = minDelay; | ||
this.maxDelay = maxDelay; | ||
} | ||
|
||
public int getMinDelay() { | ||
public Duration getMinDelay() { | ||
return minDelay; | ||
} | ||
|
||
public void setMinDelay(Integer minDelay) { | ||
public void setMinDelay(Duration minDelay) { | ||
this.minDelay = minDelay; | ||
} | ||
|
||
public int getMaxDelay() { | ||
public Duration getMaxDelay() { | ||
return maxDelay; | ||
} | ||
|
||
public void setMaxDelay(Integer maxDelay) { | ||
public void setMaxDelay(Duration maxDelay) { | ||
this.maxDelay = maxDelay; | ||
} | ||
} |
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