public class DisposableWorkerIdAssigner extends Object implements WorkerIdAssigner
WorkerIdAssigner
,
the worker id will be discarded after assigned to the UidGenerator@Transactional(rollbackFor=java.lang.Exception.class) 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
在接口中 WorkerIdAssigner