com.zusmart.base.network.support.DefaultChannelOption Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of zusmart-base Show documentation
Show all versions of zusmart-base Show documentation
提供基础的工具类及方法类,Logging,Scanner,Buffer,NetWork,Future,Thread
package com.zusmart.base.network.support;
import com.zusmart.base.network.ChannelOption;
public class DefaultChannelOption implements ChannelOption {
private int backLog = 256;
private int soTimeout = 0;
private int bufferSize = 8192;
private boolean directBuffer = false;
private boolean reuseAddress = true;
private int nioSelectorSize = Runtime.getRuntime().availableProcessors();
private String nioSelectorName = "selector";
private String nioAcceptorName = "accpetor";
@Override
public int getBackLog() {
return this.backLog;
}
@Override
public int getSoTimeout() {
return this.soTimeout;
}
@Override
public int getBufferSize() {
return this.bufferSize;
}
@Override
public boolean isDirectBuffer() {
return this.directBuffer;
}
@Override
public boolean isReuseAddress() {
return this.reuseAddress;
}
@Override
public int getNioSelectorSize() {
return this.nioSelectorSize;
}
@Override
public String getNioAcceptorName() {
return this.nioAcceptorName;
}
@Override
public String getNioSelectorName() {
return this.nioSelectorName;
}
}