internal void WriteHeader(AbstractBufferedWriter writer) { FileCollectionWithFileInfos.WriteHeader(writer, _guid); writer.WriteUInt8((byte)KVFileType.ModernKeyIndex); writer.WriteVInt64(_generation); writer.WriteVUInt32(_trLogFileId); writer.WriteVUInt32(_trLogOffset); writer.WriteVUInt64((ulong)_keyValueCount); writer.WriteVUInt64(_commitUlong); writer.WriteUInt8((byte) _compressionType); }
public void WriteHeader(AbstractBufferedWriter writer) { writer.WriteByteArrayRaw(FileCollectionWithFileInfos.MagicStartOfFile); writer.WriteUInt8((byte)KVFileType.PureValuesWithId); writer.WriteVInt64(_subId); writer.WriteVInt64(_generation); }
internal void WriteHeader(AbstractBufferedWriter writer) { writer.WriteByteArrayRaw(FileCollectionWithFileInfos.MagicStartOfFile); writer.WriteUInt8((byte)KVFileType.TransactionLog); writer.WriteVInt64(_generation); writer.WriteVInt32((int) _previousFileId); }
internal void WriteHeader(AbstractBufferedWriter writer) { FileCollectionWithFileInfos.WriteHeader(writer, _guid); writer.WriteUInt8((byte)KVFileType.TransactionLog); writer.WriteVInt64(_generation); writer.WriteVInt32((int) _previousFileId); }
public void WriteHeader(AbstractBufferedWriter writer) { FileCollectionWithFileInfos.WriteHeader(writer, _guid); writer.WriteUInt8((byte)KVFileType.PureValuesWithId); writer.WriteVInt64(_subId); writer.WriteVInt64(_generation); }
internal void WriteHeader(AbstractBufferedWriter writer) { writer.WriteByteArrayRaw(DiskChunkCache.MagicStartOfFile); writer.WriteUInt8((byte)DiskChunkFileType.HashIndex); writer.WriteVInt64(_generation); writer.WriteVUInt32((uint)KeySize); writer.WriteVUInt64((ulong)KeyValueCount); }
internal void WriteHeader(AbstractBufferedWriter writer) { writer.WriteByteArrayRaw(FileCollectionWithFileInfos.MagicStartOfFile); writer.WriteUInt8((byte) KVFileType.HashKeyIndex); writer.WriteVInt64(_subId); writer.WriteVInt64(_generation); writer.WriteVUInt32(_keyLen); }
internal void WriteHeader(AbstractBufferedWriter writer) { FileCollectionWithFileInfos.WriteHeader(writer, _guid); writer.WriteUInt8((byte) KVFileType.HashKeyIndex); writer.WriteVInt64(_subId); writer.WriteVInt64(_generation); writer.WriteVUInt32(_keyLen); }
internal void WriteHeader(AbstractBufferedWriter writer) { writer.WriteByteArrayRaw(FileCollectionWithFileInfos.MagicStartOfFile); writer.WriteUInt8((byte)KVFileType.KeyIndex); writer.WriteVInt64(_generation); writer.WriteVUInt32(_trLogFileId); writer.WriteVUInt32(_trLogOffset); writer.WriteVUInt64((ulong)_keyValueCount); }
internal void WriteHeader(AbstractBufferedWriter writer) { FileCollectionWithFileInfos.WriteHeader(writer, _guid); var withCommitUlong = _commitUlong != 0; writer.WriteUInt8((byte)(withCommitUlong ? KVFileType.KeyIndexWithCommitUlong : KVFileType.KeyIndex)); writer.WriteVInt64(_generation); writer.WriteVUInt32(_trLogFileId); writer.WriteVUInt32(_trLogOffset); writer.WriteVUInt64((ulong)_keyValueCount); if (withCommitUlong) writer.WriteVUInt64(_commitUlong); }
void StoreDescriptor(ITypeDescriptor descriptor, AbstractBufferedWriter writer) { if (descriptor is ListTypeDescriptor) { writer.WriteUInt8((byte)TypeCategory.List); } else if (descriptor is DictionaryTypeDescriptor) { writer.WriteUInt8((byte)TypeCategory.Dictionary); } else if (descriptor is ObjectTypeDescriptor) { writer.WriteUInt8((byte)TypeCategory.Class); } else if (descriptor is EnumTypeDescriptor) { writer.WriteUInt8((byte)TypeCategory.Enum); } else { throw new ArgumentOutOfRangeException(); } ((IPersistTypeDescriptor)descriptor).Persist(writer, (w, d) => { SerializerTypeInfo result; if (!_typeOrDescriptor2Info.TryGetValue(d, out result)) if (!_typeOrDescriptor2InfoNew.TryGetValue(d, out result)) throw new BTDBException("Invalid state unknown descriptor " + d.Name); w.WriteVInt32(result.Id); }); }
public void StoreDescriptor(ITypeDescriptor descriptor, AbstractBufferedWriter writer, Func<ITypeDescriptor, uint> descriptor2Id) { if (descriptor is ListTypeDescriptor) { writer.WriteUInt8((byte)TypeCategory.List); } else if (descriptor is DictionaryTypeDescriptor) { writer.WriteUInt8((byte)TypeCategory.Dictionary); } else if (descriptor is ObjectTypeDescriptor) { writer.WriteUInt8((byte)TypeCategory.Class); } else if (descriptor is EnumTypeDescriptor) { writer.WriteUInt8((byte)TypeCategory.Enum); } else { throw new ArgumentOutOfRangeException(); } var p = descriptor as IPersistTypeDescriptor; p.Persist(writer, (w, d) => w.WriteVUInt32(descriptor2Id(d))); }
public void WriteHeader(AbstractBufferedWriter writer) { writer.WriteByteArrayRaw(DiskChunkCache.MagicStartOfFile); writer.WriteUInt8((byte)DiskChunkFileType.PureValues); writer.WriteVInt64(_generation); }