|
10 | 10 | * Software. |
11 | 11 | * |
12 | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE |
13 | | - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
| 13 | + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
14 | 14 | * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
15 | 15 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
16 | 16 | */ |
@@ -48,7 +48,7 @@ public class ItemProxy { |
48 | 48 | private final List<ProcessFilter> filterList; |
49 | 49 |
|
50 | 50 | /** Preferred eps */ |
51 | | - private final long eps; |
| 51 | + private final double eps; |
52 | 52 |
|
53 | 53 | /** Limit the number of events to send */ |
54 | 54 | private final long limit; |
@@ -89,7 +89,7 @@ public ItemProxy(InputItem input, OutputItem output, List<ProcessFilter> filterL |
89 | 89 |
|
90 | 90 | String epsString = config.getValue("-e"); |
91 | 91 | if (null != epsString) { |
92 | | - this.eps = Long.parseLong(epsString); |
| 92 | + this.eps = Double.parseDouble(epsString); |
93 | 93 | } else { |
94 | 94 | this.eps = 0; |
95 | 95 | } |
@@ -119,8 +119,8 @@ public ItemProxy(InputItem input, OutputItem output, List<ProcessFilter> filterL |
119 | 119 | shutdownHandlers.add((ShutdownHandler) output); |
120 | 120 | } |
121 | 121 |
|
122 | | - String isContinousGapDetectionString = config.getValue("-cgd"); |
123 | | - if (isContinousGapDetectionString != null && isContinousGapDetectionString.equalsIgnoreCase("true")) { |
| 122 | + String isContinuousGapDetectionString = config.getValue("-cgd"); |
| 123 | + if (isContinuousGapDetectionString != null && isContinuousGapDetectionString.equalsIgnoreCase("true")) { |
124 | 124 | gapDetector = getGapDetector(filterList); |
125 | 125 | if (null == gapDetector) { |
126 | 126 | throw new RuntimeException("The flag -cgd cannot be used without a GapDetector (-gd)"); |
@@ -150,7 +150,7 @@ public ItemProxy(InputItem input, OutputItem output, List<ProcessFilter> filterL |
150 | 150 |
|
151 | 151 |
|
152 | 152 | /** |
153 | | - * Search the list of filters and, if present, return a GapDetecttionFilter |
| 153 | + * Search the list of filters and, if present, return a GapDetectionFilter |
154 | 154 | * @param filterList a List<filter> to search |
155 | 155 | * @return GapDetectionFilter or null |
156 | 156 | */ |
@@ -238,7 +238,7 @@ private void throttle(LogStatistics statistics) { |
238 | 238 | long sentMessages = statistics.getTransactionMessages(); |
239 | 239 | long now = new Date().getTime(); |
240 | 240 | // how long time should we spend on sending these messages? |
241 | | - long estimatedTime = 1000 * sentMessages / eps; |
| 241 | + long estimatedTime = (long)(1000 * sentMessages / eps); |
242 | 242 | long waitTime = transactionStart + estimatedTime - now; |
243 | 243 | if (waitTime > 10) { |
244 | 244 | try { |
|
0 commit comments