本文整理了Java中net.openhft.chronicle.bytes.Bytes.toDebugString()
方法的一些代码示例,展示了Bytes.toDebugString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Bytes.toDebugString()
方法的具体详情如下:
包路径:net.openhft.chronicle.bytes.Bytes
类名称:Bytes
方法名:toDebugString
暂无
代码示例来源:origin: net.openhft/chronicle-engine
void logYaml() {
if (YamlLogging.showServerWrites())
try {
assert outWire.startUse();
LOG.info("\nServer Sends:\n" +
Wires.fromSizePrefixedBlobs((Wire) outWire));
} catch (Exception e) {
Jvm.warn().on(getClass(), "\nServer Sends ( corrupted ) :\n" +
outWire.bytes().toDebugString());
} finally {
assert outWire.endUse();
}
}
代码示例来源:origin: net.openhft/chronicle-engine
/**
* write and exceptions and rolls back if no data was written
*/
void writeData(boolean isNotComplete, @NotNull Bytes inBytes, @NotNull WriteMarshallable c) {
@NotNull final WriteMarshallable marshallable = out -> {
final long readPosition = inBytes.readPosition();
final long position = outWire.bytes().writePosition();
try {
c.writeMarshallable(outWire);
} catch (Throwable t) {
inBytes.readPosition(readPosition);
if (LOG.isInfoEnabled())
LOG.info("While reading " + inBytes.toDebugString(),
" processing wire " + c, t);
outWire.bytes().writePosition(position);
outWire.writeEventName(() -> "exception").throwable(t);
}
// write 'reply : {} ' if no data was sent
if (position == outWire.bytes().writePosition()) {
outWire.writeEventName(reply).marshallable(EMPTY);
}
};
if (isNotComplete)
outWire.writeNotCompleteDocument(false, marshallable);
else
outWire.writeDocument(false, marshallable);
logYaml();
}
代码示例来源:origin: net.openhft/chronicle-engine
/**
* write and exceptions and rolls back if no data was written
*/
void writeData(@NotNull WireIn wireIn, @NotNull WriteMarshallable c) {
@NotNull Bytes inBytes = wireIn.bytes();
outWire.writeDocument(false, out -> {
final long readPosition = inBytes.readPosition();
final long position = outWire.bytes().writePosition();
try {
c.writeMarshallable(outWire);
} catch (Throwable t) {
final String readingYaml = wireIn.readingPeekYaml();
inBytes.readPosition(readPosition);
if (LOG.isInfoEnabled())
LOG.info("While readingBytes=" + inBytes.toDebugString() + "\nreadingYaml=" +
readingYaml,
"\nprocessing wire " + c, t);
outWire.bytes().writePosition(position);
outWire.writeEventName(() -> "readingYaml").text(readingYaml);
outWire.writeEventName(() -> "exception").throwable(t);
}
// write 'reply : {} ' if no data was sent
if (position == outWire.bytes().writePosition()) {
outWire.writeEventName(reply).marshallable(EMPTY);
}
});
logYaml();
}
代码示例来源:origin: net.openhft/chronicle-engine
Jvm.warn().on(getClass(), in.readingPeekYaml() + "/n" + in.bytes().toDebugString(),
e);
代码示例来源:origin: net.openhft/saxophone
LOG.debug("lexed %s: '" + tok + outBuf.toDebugString() + "'");
内容来源于网络,如有侵权,请联系作者删除!