public override object ReadLong(ByteArrayBuffer buffer) { var value = buffer.ReadLong(); if (value == long.MaxValue) { return null; } return value; }
public override DateTime ReadDate(ByteArrayBuffer bytes) { var value = bytes.ReadLong(); if (value == long.MaxValue) { return MarshallingConstants0.NullDate; } return new DateTime(value); }
public override DateTime ReadDate(ByteArrayBuffer bytes) { long value = bytes.ReadLong(); if (value == long.MaxValue) { return(MarshallingConstants0.NullDate); } return(new DateTime(value)); }
public override object ReadLong(ByteArrayBuffer buffer) { long value = buffer.ReadLong(); if (value == long.MaxValue) { return(null); } return(value); }
public virtual void ReadThis(ByteArrayBuffer buffer) { SystemData().ConverterVersion(buffer.ReadInt()); SystemData().FreespaceSystem(buffer.ReadByte()); buffer.ReadInt(); // was BTreeFreespaceId, converted to slot, can no longer be used SystemData().IdentityId(buffer.ReadInt()); SystemData().LastTimeStampID(buffer.ReadLong()); SystemData().UuidIndexId(buffer.ReadInt()); }
protected virtual void CheckThreadFileLock(LocalObjectContainer container, ByteArrayBuffer reader) { reader.Seek(AccessTimeOffset); var lastAccessTime = reader.ReadLong(); if (LockedByOtherSession(container, lastAccessTime)) { _timerFileLock.CheckIfOtherSessionAlive(container, 0, AccessTimeOffset, lastAccessTime ); } }
private bool CheckSumOK(ByteArrayBuffer buffer, int offset) { var initialOffSet = buffer.Offset(); var length = OwnLength(); length -= ChecksumLength; buffer.Seek(offset); var readCheckSum = buffer.ReadLong(); var checkSumBeginOffset = buffer.Offset(); var bytes = buffer._buffer; var calculatedCheckSum = CRC32.CheckSum(bytes, checkSumBeginOffset, length); buffer.Seek(initialOffSet); return(calculatedCheckSum == readCheckSum); }
protected virtual void ReadBuffer(ByteArrayBuffer buffer, bool versionsAreConsistent ) { buffer.IncrementOffset(ChecksumLength); SystemData systemData = SystemData(); systemData.IdSystemSlot(ReadSlot(buffer, false)); systemData.InMemoryFreespaceSlot(ReadSlot(buffer, !versionsAreConsistent)); systemData.BTreeFreespaceId(buffer.ReadInt()); systemData.ConverterVersion(buffer.ReadInt()); systemData.UuidIndexId(buffer.ReadInt()); systemData.IdentityId(buffer.ReadInt()); systemData.LastTimeStampID(buffer.ReadLong()); systemData.FreespaceSystem(buffer.ReadByte()); }
public virtual long ReadLong() { return(_current.ReadLong()); }
public override object ReadLong(ByteArrayBuffer buffer) { return(buffer.ReadLong()); }
public override DateTime ReadDate(ByteArrayBuffer bytes) { return(new DateTime(bytes.ReadLong())); }
public static double UnmarshalDouble(ByteArrayBuffer buffer) { return(Platform4.LongToDouble(buffer.ReadLong())); }
internal override object Read1(ByteArrayBuffer a_bytes) { return(a_bytes.ReadLong()); }
public override DateTime ReadDate(ByteArrayBuffer bytes) { return new DateTime(bytes.ReadLong()); }
public static double UnmarshalDouble(ByteArrayBuffer buffer) { return Platform4.LongToDouble(buffer.ReadLong()); }
public object ReadIndexEntry(IContext context, ByteArrayBuffer reader) { return(new IndexEntry(reader.ReadInt(), reader.ReadLong())); }
public override object ReadLong(ByteArrayBuffer buffer) { return buffer.ReadLong(); }
internal override object Read1(ByteArrayBuffer a_bytes) { return a_bytes.ReadLong(); }
protected virtual void ReadBuffer(ByteArrayBuffer buffer, bool versionsAreConsistent ) { buffer.IncrementOffset(ChecksumLength); var systemData = SystemData(); systemData.IdSystemSlot(ReadSlot(buffer, false)); systemData.InMemoryFreespaceSlot(ReadSlot(buffer, !versionsAreConsistent)); systemData.BTreeFreespaceId(buffer.ReadInt()); systemData.ConverterVersion(buffer.ReadInt()); systemData.UuidIndexId(buffer.ReadInt()); systemData.IdentityId(buffer.ReadInt()); systemData.LastTimeStampID(buffer.ReadLong()); systemData.FreespaceSystem(buffer.ReadByte()); }
private bool CheckSumOK(ByteArrayBuffer buffer, int offset) { var initialOffSet = buffer.Offset(); var length = OwnLength(); length -= ChecksumLength; buffer.Seek(offset); var readCheckSum = buffer.ReadLong(); var checkSumBeginOffset = buffer.Offset(); var bytes = buffer._buffer; var calculatedCheckSum = CRC32.CheckSum(bytes, checkSumBeginOffset, length); buffer.Seek(initialOffSet); return calculatedCheckSum == readCheckSum; }