package com.github.ltsopensource.remoting; import com.github.ltsopensource.core.constant.Constants; /** * 服务端配置 */ public class RemotingServerConfig { private int listenPort = 8888; private int serverWorkerThreads = 32; private int serverCallbackExecutorThreads = Constants.AVAILABLE_PROCESSOR * 2; private int serverSelectorThreads = Constants.AVAILABLE_PROCESSOR * 2; private int serverOnewaySemaphoreValue = 32; private int serverAsyncSemaphoreValue = 64; private int readerIdleTimeSeconds = 0; private int writerIdleTimeSeconds = 0; private int serverChannelMaxIdleTimeSeconds = 120; public int getListenPort() { return listenPort; } public void setListenPort(int listenPort) { this.listenPort = listenPort; } public int getServerWorkerThreads() { return serverWorkerThreads; } public void setServerWorkerThreads(int serverWorkerThreads) { this.serverWorkerThreads = serverWorkerThreads; } public int getServerSelectorThreads() { return serverSelectorThreads; } public void setServerSelectorThreads(int serverSelectorThreads) { this.serverSelectorThreads = serverSelectorThreads; } public int getServerOnewaySemaphoreValue() { return serverOnewaySemaphoreValue; } public void setServerOnewaySemaphoreValue(int serverOnewaySemaphoreValue) { this.serverOnewaySemaphoreValue = serverOnewaySemaphoreValue; } public int getServerCallbackExecutorThreads() { return serverCallbackExecutorThreads; } public void setServerCallbackExecutorThreads(int serverCallbackExecutorThreads) { this.serverCallbackExecutorThreads = serverCallbackExecutorThreads; } public int getServerAsyncSemaphoreValue() { return serverAsyncSemaphoreValue; } public void setServerAsyncSemaphoreValue(int serverAsyncSemaphoreValue) { this.serverAsyncSemaphoreValue = serverAsyncSemaphoreValue; } public int getServerChannelMaxIdleTimeSeconds() { return serverChannelMaxIdleTimeSeconds; } public void setServerChannelMaxIdleTimeSeconds(int serverChannelMaxIdleTimeSeconds) { this.serverChannelMaxIdleTimeSeconds = serverChannelMaxIdleTimeSeconds; } public int getReaderIdleTimeSeconds() { return readerIdleTimeSeconds; } public void setReaderIdleTimeSeconds(int readerIdleTimeSeconds) { this.readerIdleTimeSeconds = readerIdleTimeSeconds; } public int getWriterIdleTimeSeconds() { return writerIdleTimeSeconds; } public void setWriterIdleTimeSeconds(int writerIdleTimeSeconds) { this.writerIdleTimeSeconds = writerIdleTimeSeconds; } }