本文整理汇总了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;
}