Skip to content

Commit

Permalink
add IdGenerator implementation class diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahoo-Wang committed Feb 22, 2022
1 parent fb3c847 commit fa5fe57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 9 additions & 3 deletions document/docs/guide/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
> **分布式ID**生成器
```java

@ThreadSafe
public interface IdGenerator {

/**
* ID converter, used to convert {@link long} type ID to {@link String}
*
Expand All @@ -14,14 +15,14 @@ public interface IdGenerator {
default IdConverter idConverter() {
return ToStringIdConverter.INSTANCE;
}

/**
* Generate distributed ID
*
* @return distributed ID
*/
long generate();

/**
* Generate distributed ID as String
*
Expand All @@ -33,3 +34,8 @@ public interface IdGenerator {
}
```

## IdGenerator implementation class diagram

<p align="center">
<img :src="$withBase('/assets/design/IdGenerator-impl-class.png')" alt="IdGenerator implementation class diagram"/>
</p>

0 comments on commit fa5fe57

Please sign in to comment.