public class WorkerIdIp extends java.lang.Object implements WorkerId
根据机器IP获取工作进程Id,如果线上机器的IP二进制表示的最后8位不重复,建议使用此种方式,
列如机器的IP为192.168.1.108 ,设置workerId为108. 更多见: https://www.jianshu.com/p/7f0661ddd6dd
static java.lang.String
LOCAL_IP
static int
WORKER_ID
WorkerIdIp()
int
workerId()
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public static final java.lang.String LOCAL_IP
public static final int WORKER_ID
public WorkerIdIp()
public int workerId()
workerId
WorkerId
Copyright © 2021. All rights reserved.