Files
zfoo/hotswap/README.md
T
2022-12-02 20:39:13 +08:00

23 lines
866 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
English | [简体中文](./README_CN.md)
### . Introduction
- [hotswap](https://github.com/zfoo-project/zfoo/blob/main/hotswap/README.md) Hot update code, no need to stop the
server, no additional configuration, one line of code to enable hot update
### Ⅱ. Stand-alone hot update
- directly pass in the class file that needs hot update
```
// pass in the class file that needs to be updated
HotSwapUtils.hotswapClass(bytes);
```
### Ⅲ. Distributed Hot Update
- upload the class files that need to be updated to the zookeeper registration center, and other servers monitor the
class files that need to be updated, and update the code when they are monitored
- [tank](https://github.com/zfoo-project/tank-game-server/blob/main/common/src/main/java/com/zfoo/tank/common/util/HotUtils.java)
Distributed hot update code implementation