src/main/java/com/baidu/fsg/uid/worker/DisposableWorkerIdAssigner.java
@Transactional
    public long assignWorkerId() {
        // build worker node entity
        WorkerNodeEntity workerNodeEntity = buildWorkerNode();

        // add worker node for new (ignore the same IP + PORT)
        workerNodeDAO.addWorkerNode(workerNodeEntity);
        LOGGER.info("Add worker node:" + workerNodeEntity);

        return workerNodeEntity.getId();
    }
/**
     * Assign worker id base on database.<p>
     * If there is host name & port in the environment, we considered that the node runs in Docker container<br>
     * Otherwise, the node runs on an actual machine.
     * 
     * @return assigned worker id
     */
Assign worker id base on database.
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.

@return assigned worker id
Assign worker id base on database . 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 . @return assigned worker id
@Transactional
    public long assignWorkerId() {
        WorkerNodeEntity workerNodeEntity = buildWorkerNode();
        workerNodeDAO.addWorkerNode(workerNodeEntity);
        LOGGER.info("Add worker node:" + workerNodeEntity);
        return workerNodeEntity.getId();
    }
@ Transactional public long assignWorkerId ( ) { WorkerNodeEntity workerNodeEntity = buildWorkerNode ( ) ; workerNodeDAO . addWorkerNode ( workerNodeEntity ) ; LOGGER . info ( "Add worker node:" + workerNodeEntity ) ; return workerNodeEntity . getId ( ) ; }
Assign worker id base on database.<p>
 If there is host name & port in the environment, we considered that the node runs in Docker container<br>
 Otherwise, the node runs on an actual machine.
Assign worker id base on database . <p > If there is host name & port in the environment we considered that the node runs in Docker container<br > Otherwise the node runs on an actual machine .
// build worker node entity // add worker node for new (ignore the same IP + PORT)