(Object... args)
| 1592 | } |
| 1593 | |
| 1594 | public java.util.concurrent.CompletableFuture<Void> throttle(Object... args) { |
| 1595 | if (this.throttler == null) { |
| 1596 | return CompletableFuture.completedFuture(null); |
| 1597 | } |
| 1598 | double cost = 1.0; |
| 1599 | if (args.length > 0 && args[0] != null) { |
| 1600 | if (args[0] instanceof Number n) { |
| 1601 | cost = n.doubleValue(); |
| 1602 | } |
| 1603 | } |
| 1604 | return this.throttler.throttle(cost); |
| 1605 | } |
| 1606 | |
| 1607 | public Object clone(Object s) { |
| 1608 | return s; // check later |