WriteUInt8() public method

public WriteUInt8 ( byte value ) : void
value byte
return void
Beispiel #1
0
 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);
 }
Beispiel #2
0
 public void WriteHeader(AbstractBufferedWriter writer)
 {
     writer.WriteByteArrayRaw(FileCollectionWithFileInfos.MagicStartOfFile);
     writer.WriteUInt8((byte)KVFileType.PureValuesWithId);
     writer.WriteVInt64(_subId);
     writer.WriteVInt64(_generation);
 }
Beispiel #3
0
 internal void WriteHeader(AbstractBufferedWriter writer)
 {
     writer.WriteByteArrayRaw(FileCollectionWithFileInfos.MagicStartOfFile);
     writer.WriteUInt8((byte)KVFileType.TransactionLog);
     writer.WriteVInt64(_generation);
     writer.WriteVInt32((int) _previousFileId);
 }
Beispiel #4
0
 internal void WriteHeader(AbstractBufferedWriter writer)
 {
     FileCollectionWithFileInfos.WriteHeader(writer, _guid);
     writer.WriteUInt8((byte)KVFileType.TransactionLog);
     writer.WriteVInt64(_generation);
     writer.WriteVInt32((int) _previousFileId);
 }
Beispiel #5
0
 public void WriteHeader(AbstractBufferedWriter writer)
 {
     FileCollectionWithFileInfos.WriteHeader(writer, _guid);
     writer.WriteUInt8((byte)KVFileType.PureValuesWithId);
     writer.WriteVInt64(_subId);
     writer.WriteVInt64(_generation);
 }
Beispiel #6
0
 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);
 }
Beispiel #7
0
 internal void WriteHeader(AbstractBufferedWriter writer)
 {
     writer.WriteByteArrayRaw(FileCollectionWithFileInfos.MagicStartOfFile);
     writer.WriteUInt8((byte) KVFileType.HashKeyIndex);
     writer.WriteVInt64(_subId);
     writer.WriteVInt64(_generation);
     writer.WriteVUInt32(_keyLen);
 }
Beispiel #8
0
 internal void WriteHeader(AbstractBufferedWriter writer)
 {
     FileCollectionWithFileInfos.WriteHeader(writer, _guid);
     writer.WriteUInt8((byte) KVFileType.HashKeyIndex);
     writer.WriteVInt64(_subId);
     writer.WriteVInt64(_generation);
     writer.WriteVUInt32(_keyLen);
 }
Beispiel #9
0
 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);
 }
Beispiel #10
0
 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);
 }
Beispiel #11
0
 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);
     });
 }
Beispiel #12
0
 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)));
 }
Beispiel #13
0
 public void WriteHeader(AbstractBufferedWriter writer)
 {
     writer.WriteByteArrayRaw(DiskChunkCache.MagicStartOfFile);
     writer.WriteUInt8((byte)DiskChunkFileType.PureValues);
     writer.WriteVInt64(_generation);
 }