• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java LoggingService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.hazelcast.logging.LoggingService的典型用法代码示例。如果您正苦于以下问题:Java LoggingService类的具体用法?Java LoggingService怎么用?Java LoggingService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



LoggingService类属于com.hazelcast.logging包,在下文中一共展示了LoggingService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: MockIOService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
public MockIOService(Address thisAddress, LoggingService loggingService) throws Exception {
    this.thisAddress = thisAddress;
    this.loggingService = loggingService;
    hazelcastThreadGroup = new HazelcastThreadGroup(
            "hz",
            loggingService.getLogger(HazelcastThreadGroup.class),
            getClass().getClassLoader());

    serverSocketChannel = ServerSocketChannel.open();

    ServerSocket serverSocket = serverSocketChannel.socket();
    serverSocket.setReuseAddress(true);
    serverSocket.setSoTimeout(1000);
    serverSocket.bind(new InetSocketAddress("0.0.0.0", thisAddress.getPort()));

    this.serializationService = new DefaultSerializationServiceBuilder().build();
}
 
开发者ID:hazelcast,项目名称:hazelcast-simulator,代码行数:18,代码来源:MockIOService.java


示例2: before

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Before
public void before() {
    HazelcastInstance hzMock = mock(HazelcastInstance.class);
    LoggingService loggingService = mock(LoggingService.class);
    ILogger mockLogger = mock(ILogger.class);
    Mockito.when(hzMock.getName()).thenReturn("test-hz-instance");
    Mockito.when(hzMock.getLoggingService()).thenReturn(loggingService);
    Mockito.when(loggingService.getLogger(Mockito.<Class>any())).thenReturn(mockLogger);
    es = new TaskletExecutionService(hzMock, 4);
    classLoaderMock = mock(ClassLoader.class);
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:12,代码来源:TaskletExecutionServiceTest.java


示例3: getLoggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
public LoggingService getLoggingService() {
    return null;
}
 
开发者ID:xm-online,项目名称:xm-uaa,代码行数:5,代码来源:WebConfigurerTest.java


示例4: loggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
protected LoggingService loggingService() {
    return container().getLoggingService();
}
 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:5,代码来源:ClientJobProxy.java


示例5: getLoggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
public LoggingService getLoggingService() {
  return getHazelcastInstance().getLoggingService();
}
 
开发者ID:Sabadios,项目名称:Cherry,代码行数:5,代码来源:HazelcastService.java


示例6: getLoggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
public LoggingService getLoggingService() {
    return hazelcastInstance.getLoggingService();
}
 
开发者ID:mdogan,项目名称:hazelcast-archive,代码行数:4,代码来源:FactoryImpl.java


示例7: getLoggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
public LoggingService getLoggingService() {
    throw new UnsupportedOperationException();
}
 
开发者ID:mdogan,项目名称:hazelcast-archive,代码行数:4,代码来源:HazelcastClient.java


示例8: getLoggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
public LoggingService getLoggingService() {
    return loggingService;
}
 
开发者ID:hazelcast,项目名称:hazelcast-simulator,代码行数:5,代码来源:MockIOService.java


示例9: setup

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Setup
    public void setup() throws Exception {
        Node node = HazelcastTestUtils.getNode(targetInstance);
        if (node == null) {
            throw new IllegalStateException("node is null");
        }
        MetricsRegistry metricsRegistry = node.nodeEngine.getMetricsRegistry();
        LoggingService loggingService = node.loggingService;
        HazelcastThreadGroup threadGroup = node.getHazelcastThreadGroup();

        // we don't know the number of worker threads (damn hidden property), so lets assume 1000.. that should be enough
        packetHandler = new RequestPacketHandler(1000);

        Address thisAddress = node.getThisAddress();
        Address newThisAddress = new Address(thisAddress.getHost(), thisAddress.getPort() + PORT_OFFSET);
        logger.info("ThisAddress: " + newThisAddress);
        MockIOService ioService = new MockIOService(newThisAddress, loggingService);
        ioService.inputThreadCount = inputThreadCount;
        ioService.outputThreadCount = outputThreadCount;
        ioService.socketNoDelay = socketNoDelay;
        ioService.packetHandler = packetHandler;
        ioService.socketSendBufferSize = socketSendBufferSize;
        ioService.socketReceiveBufferSize = socketReceiveBufferSize;

        if (trackSequenceId) {
            ioService.writeHandlerFactory = new TaggingWriteHandlerFactory();
        }

        IOThreadingModel threadingModel = null;
        switch (ioThreadingModel) {
//            case NonBlocking:
//                NonBlockingIOThreadingModel nonBlockingIOThreadingModel = new NonBlockingIOThreadingModel(
//                        ioService, loggingService, metricsRegistry, threadGroup, null, null, null);
//                selectorMode = SelectorMode.SELECT;
//                nonBlockingIOThreadingModel.setSelectorMode(selectorMode);
//                threadingModel = nonBlockingIOThreadingModel;
//                break;
//            case Spinning:
//                threadingModel = new SpinningIOThreadingModel(loggingService, threadGroup);
//                break;
            default:
                throw new IllegalStateException("Unrecognized threading model: " + ioThreadingModel);
        }
//
//        connectionManager = new TcpIpConnectionManager(
//                ioService, ioService.serverSocketChannel, loggingService, metricsRegistry, threadingModel);
//        connectionManager.start();
//        networkCreateLock = targetInstance.getLock("connectionCreateLock");
    }
 
开发者ID:hazelcast,项目名称:hazelcast-simulator,代码行数:50,代码来源:NetworkTest.java


示例10: setup

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Setup
public void setup() throws Exception {
    Node node = HazelcastTestUtils.getNode(targetInstance);
    if (node == null) {
        throw new IllegalStateException("node is null");
    }
    MetricsRegistry metricsRegistry = node.nodeEngine.getMetricsRegistry();
    LoggingService loggingService = node.loggingService;
    HazelcastThreadGroup threadGroup = node.getHazelcastThreadGroup();

    // we don't know the number of worker threads (damn hidden property), so lets assume 1000.. that should be enough
    packetHandler = new RequestPacketHandler(1000);

    Address thisAddress = node.getThisAddress();
    Address newThisAddress = new Address(thisAddress.getHost(), thisAddress.getPort() + PORT_OFFSET);
    logger.info("ThisAddress: " + newThisAddress);
    MockIOService ioService = new MockIOService(newThisAddress, loggingService);
    ioService.inputThreadCount = inputThreadCount;
    ioService.outputThreadCount = outputThreadCount;
    ioService.socketNoDelay = socketNoDelay;
    ioService.packetHandler = packetHandler;
    ioService.socketSendBufferSize = socketSendBufferSize;
    ioService.socketReceiveBufferSize = socketReceiveBufferSize;

    if (trackSequenceId) {
        ioService.writeHandlerFactory = new TaggingWriteHandlerFactory();
    }

    IOThreadingModel threadingModel;
    switch (ioThreadingModel) {
        case NonBlocking:
            NonBlockingIOThreadingModel nonBlockingIOThreadingModel = new NonBlockingIOThreadingModel(
                    ioService, loggingService, metricsRegistry, threadGroup);
            nonBlockingIOThreadingModel.setSelectorMode(selectorMode);
            threadingModel = nonBlockingIOThreadingModel;
            break;
        case Spinning:
            threadingModel = new SpinningIOThreadingModel(ioService, loggingService, metricsRegistry, threadGroup);
            break;
        default:
            throw new IllegalStateException("Unrecognized threading model: " + ioThreadingModel);
    }

    connectionManager = new TcpIpConnectionManager(
            ioService, ioService.serverSocketChannel, loggingService, metricsRegistry, threadingModel);
    connectionManager.start();
    networkCreateLock = targetInstance.getLock("connectionCreateLock");
}
 
开发者ID:hazelcast,项目名称:hazelcast-simulator,代码行数:49,代码来源:NetworkTest.java


示例11: getLoggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
public LoggingService getLoggingService() {
    return instance.getLoggingService();
}
 
开发者ID:lburgazzoli,项目名称:lb-hazelcast,代码行数:5,代码来源:HzPrefixedInstance.java


示例12: getLoggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
/**
 * Returns the logging service of this Hazelcast instance.
 * LoggingService allows you to listen for LogEvents
 * generated by Hazelcast runtime. You can log the events somewhere
 * or take action base on the message.
 *
 * @return logging service
 */
public static LoggingService getLoggingService() {
    return getDefaultInstance().getLoggingService();
}
 
开发者ID:mdogan,项目名称:hazelcast-archive,代码行数:12,代码来源:Hazelcast.java


示例13: getLoggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
/**
 * Returns the logging service of this Hazelcast instance.
 * LoggingService allows you to listen for LogEvents
 * generated by Hazelcast runtime. You can log the events somewhere
 * or take action base on the message.
 *
 * @return logging service
 */
LoggingService getLoggingService();
 
开发者ID:mdogan,项目名称:hazelcast-archive,代码行数:10,代码来源:HazelcastInstance.java


示例14: getLoggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
/**
 * Returns the logging service of this Hazelcast instance.
 * LoggingService allows you to listen for LogEvents
 * generated by Hazelcast runtime. You can log the events somewhere
 * or take action base on the message.
 *
 * @return logging service
 *
 * @deprecated as of version 2.2
 * @see #newHazelcastInstance(com.hazelcast.config.Config)
 * @see HazelcastInstance#getLoggingService()
 */
@Deprecated
public static LoggingService getLoggingService() {
    return getDefaultInstance().getLoggingService();
}
 
开发者ID:health-and-care-developer-network,项目名称:health-and-care-developer-network,代码行数:17,代码来源:Hazelcast.java


示例15: loggingService

import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
protected abstract LoggingService loggingService(); 
开发者ID:hazelcast,项目名称:hazelcast-jet,代码行数:2,代码来源:AbstractJobProxy.java



注:本文中的com.hazelcast.logging.LoggingService类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java HtmlInputText类代码示例发布时间:2022-05-21
下一篇:
Java SyncValueMessage类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap