-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
542 additions
and
168 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
31 changes: 31 additions & 0 deletions
31
...nks-components/common-component/src/main/java/org/jetlinks/community/buffer/Buffered.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,31 @@ | ||
package org.jetlinks.community.buffer; | ||
|
||
/** | ||
* 已缓冲的数据 | ||
* | ||
* @param <T> 数据类型 | ||
* @author zhouhao | ||
* @since 2.2 | ||
*/ | ||
public interface Buffered<T> { | ||
|
||
/** | ||
* @return 数据 | ||
*/ | ||
T getData(); | ||
|
||
/** | ||
* @return 当前重试次数 | ||
*/ | ||
int getRetryTimes(); | ||
|
||
/** | ||
* 标记是否重试此数据 | ||
*/ | ||
void retry(boolean retry); | ||
|
||
/** | ||
* 标记此数据为死信 | ||
*/ | ||
void dead(); | ||
} |
Oops, something went wrong.