protected internal virtual RequestContext ReadContext(ChannelBuffer buffer) { long sessionId = buffer.readLong(); int machineId = buffer.readInt(); int eventIdentifier = buffer.readInt(); long neoTx = buffer.readLong(); long checksum = buffer.readLong(); RequestContext readRequestContext = new RequestContext(sessionId, machineId, eventIdentifier, neoTx, checksum); // verify checksum only if there are transactions committed in the store if (neoTx > Org.Neo4j.Kernel.impl.transaction.log.TransactionIdStore_Fields.BASE_TX_ID) { _txVerifier.assertMatch(neoTx, checksum); } return(readRequestContext); }
// NOTICE: this assumes a "smart" ChannelBuffer that continues to next chunk //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public Void read(org.jboss.netty.buffer.ChannelBuffer buffer, ByteBuffer temporaryBuffer) throws java.io.IOException public override Void Read(ChannelBuffer buffer, ByteBuffer temporaryBuffer) { int pathLength; while (0 != (pathLength = buffer.readUnsignedShort())) { string path = ReadString(buffer, pathLength); bool hasData = buffer.readByte() == 1; int recordSize = hasData ? buffer.readInt() : Org.Neo4j.Kernel.impl.store.format.RecordFormat_Fields.NO_RECORD_SIZE; Writer.write(path, hasData ? new BlockLogReader(buffer) : null, temporaryBuffer, hasData, recordSize); } Writer.Dispose(); return(null); }
public override int ReadInt() { return(_buffer.readInt()); }
public static string ReadString(ChannelBuffer buffer) { return(ReadString(buffer, buffer.readInt())); }