本文整理匯總了Java中org.jboss.netty.util.HashedWheelTimer.start方法的典型用法代碼示例。如果您正苦於以下問題:Java HashedWheelTimer.start方法的具體用法?Java HashedWheelTimer.start怎麽用?Java HashedWheelTimer.start使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jboss.netty.util.HashedWheelTimer
的用法示例。
在下文中一共展示了HashedWheelTimer.start方法的12個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: doStart
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
@Override
protected void doStart() throws Exception {
if (timer == null) {
HashedWheelTimer hashedWheelTimer = new HashedWheelTimer();
hashedWheelTimer.start();
timer = hashedWheelTimer;
}
if (configuration == null) {
configuration = new NettyConfiguration();
}
if (configuration.isOrderedThreadPoolExecutor()) {
executorService = createExecutorService();
}
super.doStart();
}
示例2: DefaultPinpointClientHandler
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
public DefaultPinpointClientHandler(DefaultPinpointClientFactory clientFactory, long pingDelay, long handshakeRetryInterval, long timeoutMillis) {
if (clientFactory == null) {
throw new NullPointerException("pinpointClientFactory must not be null");
}
HashedWheelTimer timer = TimerFactory.createHashedWheelTimer("Pinpoint-PinpointClientHandler-Timer", 100, TimeUnit.MILLISECONDS, 512);
timer.start();
this.channelTimer = timer;
this.clientFactory = clientFactory;
this.requestManager = new RequestManager(timer, timeoutMillis);
this.pingDelay = pingDelay;
this.timeoutMillis = timeoutMillis;
this.messageListener = clientFactory.getMessageListener(SimpleMessageListener.INSTANCE);
this.serverStreamChannelMessageListener = clientFactory.getServerStreamChannelMessageListener(DisabledServerStreamChannelMessageListener.INSTANCE);
this.objectUniqName = ClassUtils.simpleClassNameAndHashCodeString(this);
this.handshaker = new PinpointClientHandshaker(channelTimer, (int) handshakeRetryInterval, maxHandshakeCount);
this.socketId = clientFactory.issueNewSocketId();
this.pingIdGenerator = new AtomicInteger(0);
this.state = new PinpointClientHandlerState(this, clientFactory.getStateChangeEventListeners());
this.localClusterOption = clientFactory.getClusterOption();
}
示例3: initTimer
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
private static synchronized void initTimer() {
if (Timer.timer == null) {
HashedWheelTimer hwTimer = new HashedWheelTimer();
hwTimer.start();
Timer.timer = hwTimer;
}
}
示例4: initTimer
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
private static synchronized void initTimer() {
if (AtriumTimer.timer == null) {
HashedWheelTimer hwTimer = new HashedWheelTimer();
hwTimer.start();
AtriumTimer.timer = hwTimer;
}
}
示例5: PinpointSocketHandler
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
public PinpointSocketHandler(PinpointSocketFactory pinpointSocketFactory, long pingDelay, long handshakeRetryInterval, long timeoutMillis) {
if (pinpointSocketFactory == null) {
throw new NullPointerException("pinpointSocketFactory must not be null");
}
HashedWheelTimer timer = TimerFactory.createHashedWheelTimer("Pinpoint-SocketHandler-Timer", 100, TimeUnit.MILLISECONDS, 512);
timer.start();
this.channelTimer = timer;
this.pinpointSocketFactory = pinpointSocketFactory;
this.requestManager = new RequestManager(timer);
this.pingDelay = pingDelay;
this.handshakeRetryInterval = handshakeRetryInterval;
this.timeoutMillis = timeoutMillis;
MessageListener messageLisener = pinpointSocketFactory.getMessageListener();
if (messageLisener != null) {
this.messageListener = messageLisener;
} else {
this.messageListener = SimpleLoggingMessageListener.LISTENER;
}
ServerStreamChannelMessageListener serverStreamChannelMessageListener = pinpointSocketFactory.getServerStreamChannelMessageListener();
if (serverStreamChannelMessageListener != null) {
this.serverStreamChannelMessageListener = serverStreamChannelMessageListener;
} else {
this.serverStreamChannelMessageListener = DisabledServerStreamChannelMessageListener.INSTANCE;
}
pinpointSocketFactory.getServerStreamChannelMessageListener();
this.handshaker = new PinpointClientSocketHandshaker(channelTimer, (int) handshakeRetryInterval, maxHandshakeCount);
}
示例6: createConfig
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
private static NettyAsyncHttpProviderConfig createConfig() {
final NettyAsyncHttpProviderConfig nettyConfig = new NettyAsyncHttpProviderConfig();
final NioClientSocketChannelFactory channelFactory = new NioClientSocketChannelFactory();
nettyConfig.setSocketChannelFactory(channelFactory);
nettyConfig.setChunkedFileChunkSize(CHUNKED_FILE_CHUNK_SIZE);
final HashedWheelTimer timer = new HashedWheelTimer();
timer.start();
nettyConfig.setNettyTimer(timer);
registerShutdownHook(channelFactory, timer);
return nettyConfig;
}
示例7: createTimer
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
private Timer createTimer(String name) {
String timerName = "Pinpoint-TcpDataSender-Timer";
if (name != null) {
timerName = String.format("Pinpoint-TcpDataSender(%s)-Timer", name);
}
HashedWheelTimer timer = TimerFactory.createHashedWheelTimer(timerName, 100, TimeUnit.MILLISECONDS, 512);
timer.start();
return timer;
}
示例8: createTimer
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
private Timer createTimer() {
HashedWheelTimer timer = TimerFactory.createHashedWheelTimer("Pinpoint-SocketFactory-Timer", 100, TimeUnit.MILLISECONDS, 512);
timer.start();
return timer;
}
示例9: testTimerStartTiming
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
public void testTimerStartTiming() throws InterruptedException {
HashedWheelTimer timer = new HashedWheelTimer(1000, TimeUnit.MILLISECONDS);
timer.start();
timer.stop();
}
示例10: createTimer
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
private Timer createTimer() {
HashedWheelTimer timer = TimerFactory.createHashedWheelTimer("Pinpoint-DataSender-Timer", 100, TimeUnit.MILLISECONDS, 512);
timer.start();
return timer;
}
示例11: createTimer
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
private Timer createTimer() {
HashedWheelTimer timer = TimerFactory.createHashedWheelTimer("Pinpoint-Web-Cluster-Timer", 100, TimeUnit.MILLISECONDS, 512);
timer.start();
return timer;
}
示例12: createTimer
import org.jboss.netty.util.HashedWheelTimer; //導入方法依賴的package包/類
private Timer createTimer() {
HashedWheelTimer timer = TimerFactory.createHashedWheelTimer("Pinpoint-Flink-Cluster-Timer", 100, TimeUnit.MILLISECONDS, 512);
timer.start();
return timer;
}