public void writeMarshallable(BytesOut bytes) { bytes.writeInt(age); bytes.writeUtf8(name); }
public void writeMarshallable(BytesOut bytes) { bytes.writeInt(age); bytes.writeUtf8(name); }
private static void writeMessage(final int j, final ChronicleQueue queue) { final ExcerptAppender appender = queue.acquireAppender(); appender.writeBytes(b -> b.writeInt(j)); }
@Override @SuppressWarnings({"rawtypes", "No way to provide generic type and override WriteBytesMarshallable."}) public void writeMarshallable(@NotNull final BytesOut bytes) { bytes.writeLong(this.logEntry.getSessionId()); bytes.writeInt(this.logEntry.getLogLevel()); bytes.writeInt(this.logEntry.getSecurityLevel()); bytes.writeLong(this.logEntry.getPosixTimestamp()); // Limit size of string messages. final int messageSize = Math.min(this.logEntry.getMessage().length(), this.maxMessageSize); // Write message length bytes.writeStopBit((long) messageSize); // Write message bytes. bytes.write(this.logEntry.getMessage(), 0, messageSize); } }
@Override protected void getValue(Object o, @NotNull BytesOut write) throws IllegalAccessException { write.writeInt(field.getInt(o)); }
public void commit(long offset) { ExcerptAppender appender = offsetQueue.acquireAppender(); appender.writeBytes(b -> b.writeInt(partition).writeLong(offset).writeLong(System.currentTimeMillis())); lastCommittedOffset = offset; }
@Override public void writeMarshallable(BytesOut bytes) { bytes.writeInt((bs.readInt(offset + 0)) & ((1 << 24) - 1)); bytes.writeLong((bs.readLong(offset + 3)) & ((1L << 40) - 1)); bytes.writeLong((bs.readLong(offset + 8)) & ((1L << 40) - 1)); bytes.writeLong((bs.readInt(offset + 13)) & 0xFFFFFFFFL); bytes.writeLong(bs.readLong(offset + 17)); bytes.writeInt(bs.readInt(offset + 25)); bytes.writeInt((bs.readByte(offset + 29)) & 0xFF); for (int index = 0; index < 128; index++) { bytes.writeBoolean(getModificationIteratorInitAt(index)); } }
return; case "java.lang.Integer": writeInt((Integer) obj); return;
@Override public void writeMarshallable(BytesOut bytes) { bytes.writeInt((bs.readInt(offset + 0)) & ((1 << 24) - 1)); bytes.writeLong((bs.readLong(offset + 3)) & ((1L << 40) - 1)); bytes.writeLong((bs.readLong(offset + 8)) & ((1L << 40) - 1)); bytes.writeLong((bs.readInt(offset + 13)) & 0xFFFFFFFFL); bytes.writeLong(bs.readLong(offset + 17)); }