final BlocksLocker blockLocker) {
switch (WorkerConf.get().NETWORK_TYPE) {
case NIO:
return new NIODataServer(dataAddress, blockLocker);
case NETTY:
return new NettyDataServer(dataAddress, blockLocker);
default:
throw new AssertionError("Unknown network type: " + WorkerConf.get().NETWORK_TYPE);
}
}