当前位置: 首页>>代码示例>>Java>>正文


Java HashedWheelTimer.start方法代码示例

本文整理汇总了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();
}
 
开发者ID:HydAu,项目名称:Camel,代码行数:18,代码来源:NettyComponent.java

示例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();
}
 
开发者ID:naver,项目名称:pinpoint,代码行数:27,代码来源:DefaultPinpointClientHandler.java

示例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;
    }
}
 
开发者ID:shlee89,项目名称:athena,代码行数:8,代码来源:Timer.java

示例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;
	}
}
 
开发者ID:onfsdn,项目名称:atrium-odl,代码行数:8,代码来源:AtriumTimer.java

示例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);
}
 
开发者ID:masonmei,项目名称:apm-agent,代码行数:33,代码来源:PinpointSocketHandler.java

示例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;
    }
 
开发者ID:outbrain,项目名称:ob1k,代码行数:16,代码来源:HttpClient.java

示例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;
}
 
开发者ID:naver,项目名称:pinpoint,代码行数:11,代码来源:TcpDataSender.java

示例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;
}
 
开发者ID:masonmei,项目名称:apm-agent,代码行数:6,代码来源:PinpointSocketFactory.java

示例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();
}
 
开发者ID:masonmei,项目名称:apm-agent,代码行数:6,代码来源:RequestManagerTest.java

示例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;
}
 
开发者ID:masonmei,项目名称:apm-agent,代码行数:6,代码来源:TcpDataSender.java

示例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;
}
 
开发者ID:naver,项目名称:pinpoint,代码行数:6,代码来源:ZookeeperClusterDataManager.java

示例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;
}
 
开发者ID:naver,项目名称:pinpoint,代码行数:6,代码来源:FlinkServerRegister.java


注:本文中的org.jboss.netty.util.HashedWheelTimer.start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。