-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(backpressure): introduce interface
Checker
(#2162)
Signed-off-by: Ning Yu <[email protected]>
- Loading branch information
1 parent
bcdd7e1
commit 7d6c2c9
Showing
4 changed files
with
54 additions
and
13 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
33 changes: 33 additions & 0 deletions
33
s3stream/src/main/java/com/automq/stream/s3/backpressure/Checker.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,33 @@ | ||
/* | ||
* Copyright 2024, AutoMQ HK Limited. | ||
* | ||
* The use of this file is governed by the Business Source License, | ||
* as detailed in the file "/LICENSE.S3Stream" included in this repository. | ||
* | ||
* As of the Change Date specified in that file, in accordance with | ||
* the Business Source License, use of this software will be governed | ||
* by the Apache License, Version 2.0 | ||
*/ | ||
|
||
package com.automq.stream.s3.backpressure; | ||
|
||
/** | ||
* A checker to check the load level of the system periodically. | ||
*/ | ||
public interface Checker { | ||
|
||
/** | ||
* The source of the checker, which should be unique to identify the checker. | ||
*/ | ||
String source(); | ||
|
||
/** | ||
* Check the load level of the system. | ||
*/ | ||
LoadLevel check(); | ||
|
||
/** | ||
* The interval in milliseconds to check the load level of the system. | ||
*/ | ||
long intervalMs(); | ||
} |
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