Example #1
0
 public ReadOnlyEventStore(IEventFileStorage file, ITypeSerializersMapping mapping, ICompressionStrategy compressionStrategy)
 {
     File = file;
     Mapping = mapping;
     CompressionStrategy = compressionStrategy;
     EndBufferPosition = ulong.MaxValue;
     MaxBlockSize = Math.Min(File.MaxBlockSize, 0x1000000); // For Length there is only 3 bytes so maximum could be less
     if (MaxBlockSize < FirstReadAhead) throw new ArgumentException("file.MaxBlockSize is less than FirstReadAhead");
 }
Example #2
0
 public ReadOnlyEventStore(IEventFileStorage file, ITypeSerializersMapping mapping, ICompressionStrategy compressionStrategy)
 {
     File                = file;
     Mapping             = mapping;
     CompressionStrategy = compressionStrategy;
     EndBufferPosition   = ulong.MaxValue;
     MaxBlockSize        = Math.Min(File.MaxBlockSize, 0x1000000); // For Length there is only 3 bytes so maximum could be less
     if (MaxBlockSize < FirstReadAhead)
     {
         throw new ArgumentException("file.MaxBlockSize is less than FirstReadAhead");
     }
 }
Example #3
0
 public IWriteEventStore AppendToStore(IEventFileStorage file)
 {
     return(new AppendingEventStore(file, _typeSerializers.CreateMapping(), CompressionStrategy));
 }
Example #4
0
 public IReadEventStore OpenReadOnlyStore(IEventFileStorage file)
 {
     return(new ReadOnlyEventStore(file, _typeSerializers.CreateMapping(), CompressionStrategy));
 }
Example #5
0
 public IWriteEventStore AppendToStore(IEventFileStorage file)
 {
     return new AppendingEventStore(file, _typeSerializers.CreateMapping(), CompressionStrategy);
 }
Example #6
0
 public IReadEventStore OpenReadOnlyStore(IEventFileStorage file)
 {
     return new ReadOnlyEventStore(file, _typeSerializers.CreateMapping(), CompressionStrategy);
 }
Example #7
0
 public virtual IEventFileStorage CreateNew(IEventFileStorage file)
 {
     throw new InvalidOperationException();
 }
Example #8
0
 public IEventFileStorage CreateNew(IEventFileStorage file)
 {
     return new MemoryEventFileStorage(MaxBlockSize, MaxFileSize);
 }
Example #9
0
 public virtual IEventFileStorage CreateNew(IEventFileStorage file)
 {
     throw new InvalidOperationException();
 }
Example #10
0
 public IEventFileStorage CreateNew(IEventFileStorage file)
 {
     return(new MemoryEventFileStorage(MaxBlockSize, MaxFileSize));
 }
Example #11
0
 public AppendingEventStore(IEventFileStorage file, ITypeSerializersMapping mapping, ICompressionStrategy compressionStrategy)
     : base(file, mapping, compressionStrategy)
 {
 }
Example #12
0
 public AppendingEventStore(IEventFileStorage file, ITypeSerializersMapping mapping, ICompressionStrategy compressionStrategy)
     : base(file, mapping, compressionStrategy)
 {
 }