當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。