本文整理汇总了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();
}
示例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);
}
示例3: getLoggingService
import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
public LoggingService getLoggingService() {
return null;
}
示例4: loggingService
import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
protected LoggingService loggingService() {
return container().getLoggingService();
}
示例5: getLoggingService
import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
public LoggingService getLoggingService() {
return getHazelcastInstance().getLoggingService();
}
示例6: getLoggingService
import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
public LoggingService getLoggingService() {
return hazelcastInstance.getLoggingService();
}
示例7: getLoggingService
import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
public LoggingService getLoggingService() {
throw new UnsupportedOperationException();
}
示例8: getLoggingService
import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
public LoggingService getLoggingService() {
return loggingService;
}
示例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");
}
示例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");
}
示例11: getLoggingService
import com.hazelcast.logging.LoggingService; //导入依赖的package包/类
@Override
public LoggingService getLoggingService() {
return instance.getLoggingService();
}
示例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();
}
示例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();
示例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();