本文整理了Java中net.openhft.chronicle.core.Jvm.setExceptionHandlers()
方法的一些代码示例,展示了Jvm.setExceptionHandlers()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jvm.setExceptionHandlers()
方法的具体详情如下:
包路径:net.openhft.chronicle.core.Jvm
类名称:Jvm
方法名:setExceptionHandlers
暂无
代码示例来源:origin: OpenHFT/Chronicle-Queue
public static void main(String[] args) {
long start = System.currentTimeMillis();
final TLogEntry entry = new TLogEntry();
entry.setSessionId(321234L);
entry.setLogLevel(77);
entry.setSecurityLevel(1234);
entry.setPosixTimestamp(6141234321L);
entry.setMessage("This is a test message for the system................................ A");
final LogEntryOutput output = new LogEntryOutput(1024);
output.setMarshallable(entry);
final ChronicleQueue queue = ChronicleQueue.singleBuilder(
OS.TARGET + "/test-" + System.nanoTime())
.rollCycle(RollCycles.HOURLY)
.build();
final ExcerptAppender appender = queue.acquireAppender();
Jvm.setExceptionHandlers(Slf4jExceptionHandler.FATAL, Slf4jExceptionHandler.WARN, Slf4jExceptionHandler.WARN);
for (int j = 0; j < 100; ++j) {
for (int i = 0; i < 100000; ++i) {
appender.writeBytes(output);
}
System.out.println((j + 1) * 100000);
// Jvm.pause(100L);
}
queue.close();
System.out.println("took " + (System.currentTimeMillis() - start) / 1e3);
}
代码示例来源:origin: OpenHFT/Chronicle-Core
@Deprecated
public static void setExceptionsHandlers(@Nullable ExceptionHandler fatal,
@Nullable ExceptionHandler warn,
@Nullable ExceptionHandler debug) {
setExceptionHandlers(fatal, warn, debug);
}
代码示例来源:origin: net.openhft/chronicle-core
@Deprecated
public static void setExceptionsHandlers(@Nullable ExceptionHandler fatal,
@Nullable ExceptionHandler warn,
@Nullable ExceptionHandler debug) {
setExceptionHandlers(fatal, warn, debug);
}
代码示例来源:origin: net.openhft/chronicle-core
public static void setExceptionHandlers(@Nullable ExceptionHandler fatal,
@Nullable ExceptionHandler warn,
@Nullable ExceptionHandler debug,
@Nullable ExceptionHandler perf) {
setExceptionHandlers(fatal, warn, debug);
PERF.defaultHandler(perf);
}
代码示例来源:origin: OpenHFT/Chronicle-Core
public static void setExceptionHandlers(@Nullable ExceptionHandler fatal,
@Nullable ExceptionHandler warn,
@Nullable ExceptionHandler debug,
@Nullable ExceptionHandler perf) {
setExceptionHandlers(fatal, warn, debug);
PERF.defaultHandler(perf);
}
内容来源于网络,如有侵权,请联系作者删除!