public class DisposableWorkerIdAssigner extends Object implements WorkerIdAssigner
WorkerIdAssigner,
the worker id will be discarded after assigned to the UidGenerator| 构造器和说明 |
|---|
DisposableWorkerIdAssigner() |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
assignWorkerId()
Assign worker id base on database.
|
@Transactional public long assignWorkerId()
If there is host name & port in the environment, we considered that the node runs in Docker container
Otherwise, the node runs on an actual machine.
assignWorkerId 在接口中 WorkerIdAssignerCopyright © 2022. All rights reserved.