public virtual void Label(int id, string name, params int[] dynamicIds) { LabelTokenRecord before = new LabelTokenRecord(id); LabelTokenRecord after = WithName(new LabelTokenRecord(id), dynamicIds, name); _otherCommands.Add(new Command.LabelTokenCommand(before, after)); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private org.neo4j.kernel.impl.store.record.LabelTokenRecord readLabelTokenRecord(int id, org.neo4j.storageengine.api.ReadableChannel channel) throws java.io.IOException private LabelTokenRecord ReadLabelTokenRecord(int id, ReadableChannel channel) { // in_use(byte)+type_blockId(int)+nr_type_records(int) sbyte inUseFlag = channel.Get(); bool inUse = false; if ((inUseFlag & Record.IN_USE.byteValue()) == Record.IN_USE.byteValue()) { inUse = true; } else if (inUseFlag != Record.NOT_IN_USE.byteValue()) { throw new IOException("Illegal in use flag: " + inUseFlag); } LabelTokenRecord record = new LabelTokenRecord(id); record.InUse = inUse; record.NameId = channel.Int; int nrTypeRecords = channel.Int; for (int i = 0; i < nrTypeRecords; i++) { DynamicRecord dr = ReadDynamicRecord(channel); if (dr == null) { return(null); } record.AddNameRecord(dr); } return(record); }
public static LabelTokenCommand CreateLabelToken(int id, int nameId) { LabelTokenRecord before = new LabelTokenRecord(id); LabelTokenRecord after = new LabelTokenRecord(id); PopulateTokenRecord(after, nameId); return(new LabelTokenCommand(before, after)); }
public override void visitCreatedLabelToken(long id, string name) { LabelTokenRecord before = new LabelTokenRecord(id); LabelTokenRecord after = before.Clone(); after.InUse = true; _target.add(new Command.LabelTokenCommand(before, after)); }
private LabelTokenRecord CreateLabelTokenRecord(int id) { LabelTokenRecord labelTokenRecord = new LabelTokenRecord(id); labelTokenRecord.InUse = true; labelTokenRecord.NameId = 333; labelTokenRecord.AddNameRecord(new DynamicRecord(43)); return(labelTokenRecord); }
public override LabelTokenRecord Clone() { LabelTokenRecord labelTokenRecord = new LabelTokenRecord(IntId); labelTokenRecord.InUse = InUse(); if (Created) { labelTokenRecord.SetCreated(); } labelTokenRecord.NameId = NameId; labelTokenRecord.AddNameRecords(NameRecords); return(labelTokenRecord); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldMarshalTokenRequest() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldMarshalTokenRequest() { ByteBuf buffer = Unpooled.buffer(); List <StorageCommand> commands = new List <StorageCommand>(); LabelTokenRecord before = new LabelTokenRecord(0); LabelTokenRecord after = new LabelTokenRecord(0); after.InUse = true; after.SetCreated(); after.NameId = 3232; commands.Add(new Command.LabelTokenCommand(before, after)); ReplicatedContent message = new ReplicatedTokenRequest(TokenType.LABEL, "theLabel", ReplicatedTokenRequestSerializer.commandBytes(commands)); AssertMarshalingEquality(buffer, message); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private Command visitLabelTokenCommand(org.neo4j.storageengine.api.ReadableChannel channel) throws java.io.IOException private Command VisitLabelTokenCommand(ReadableChannel channel) { int id = channel.Int; LabelTokenRecord before = ReadLabelTokenRecord(id, channel); if (before == null) { return(null); } LabelTokenRecord after = ReadLabelTokenRecord(id, channel); if (after == null) { return(null); } return(new Command.LabelTokenCommand(before, after)); }
protected internal abstract void CheckLabelToken(RecordStore <LabelTokenRecord> store, LabelTokenRecord record, RecordCheck <LabelTokenRecord, ConsistencyReport_LabelTokenConsistencyReport> checker);
public override void ProcessLabelToken(RecordStore <LabelTokenRecord> store, LabelTokenRecord record) { CheckLabelToken(store, record, _labelTokenChecker); }
public override void ForLabelName(LabelTokenRecord label, RecordCheck <LabelTokenRecord, ConsistencyReport_LabelTokenConsistencyReport> checker) { Dispatch(RecordType.LABEL, _labelKeyReport, label, checker); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public abstract void processLabelToken(RecordStore<org.neo4j.kernel.impl.store.record.LabelTokenRecord> store, org.neo4j.kernel.impl.store.record.LabelTokenRecord record) throws FAILURE; public abstract void ProcessLabelToken(RecordStore <LabelTokenRecord> store, LabelTokenRecord record);
protected internal override void CheckLabelToken(RecordStore <LabelTokenRecord> store, LabelTokenRecord label, RecordCheck <LabelTokenRecord, Org.Neo4j.Consistency.report.ConsistencyReport_LabelTokenConsistencyReport> checker) { _report.forLabelName(label, checker); }
public virtual void Create(LabelTokenRecord labelToken) { labelToken.SetCreated(); Update(new LabelTokenRecord(labelToken.IntId), labelToken); }
public virtual void Update(LabelTokenRecord before, LabelTokenRecord after) { _otherCommands.Add(new Command.LabelTokenCommand(before, after)); }