mirror of
https://github.com/tiennm99/zfoo.git
synced 2026-08-06 02:24:25 +00:00
perf[net]: 优化了comsumer消费方式选择
This commit is contained in:
@@ -32,6 +32,8 @@ public class ProtocolModule {
|
||||
*/
|
||||
private int version;
|
||||
|
||||
private String loadBalancer;
|
||||
|
||||
private int group;
|
||||
|
||||
private transient int hash;
|
||||
@@ -56,8 +58,9 @@ public class ProtocolModule {
|
||||
this.perfectHash();
|
||||
}
|
||||
|
||||
public ProtocolModule(String name, String group) {
|
||||
public ProtocolModule(String name, String loadBalancer, String group) {
|
||||
this.name = name;
|
||||
this.loadBalancer = loadBalancer;
|
||||
this.group = Integer.parseInt(group);
|
||||
}
|
||||
|
||||
@@ -114,6 +117,14 @@ public class ProtocolModule {
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getLoadBalancer() {
|
||||
return loadBalancer;
|
||||
}
|
||||
|
||||
public void setLoadBalancer(String loadBalancer) {
|
||||
this.loadBalancer = loadBalancer;
|
||||
}
|
||||
|
||||
public int getGroup() {
|
||||
return group;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user