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"); }
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"); } }
public IWriteEventStore AppendToStore(IEventFileStorage file) { return(new AppendingEventStore(file, _typeSerializers.CreateMapping(), CompressionStrategy)); }
public IReadEventStore OpenReadOnlyStore(IEventFileStorage file) { return(new ReadOnlyEventStore(file, _typeSerializers.CreateMapping(), CompressionStrategy)); }
public IWriteEventStore AppendToStore(IEventFileStorage file) { return new AppendingEventStore(file, _typeSerializers.CreateMapping(), CompressionStrategy); }
public IReadEventStore OpenReadOnlyStore(IEventFileStorage file) { return new ReadOnlyEventStore(file, _typeSerializers.CreateMapping(), CompressionStrategy); }
public virtual IEventFileStorage CreateNew(IEventFileStorage file) { throw new InvalidOperationException(); }
public IEventFileStorage CreateNew(IEventFileStorage file) { return new MemoryEventFileStorage(MaxBlockSize, MaxFileSize); }
public IEventFileStorage CreateNew(IEventFileStorage file) { return(new MemoryEventFileStorage(MaxBlockSize, MaxFileSize)); }
public AppendingEventStore(IEventFileStorage file, ITypeSerializersMapping mapping, ICompressionStrategy compressionStrategy) : base(file, mapping, compressionStrategy) { }