Represents collection of events within a Windows Azure Blob (residing inside a CloudPageBlob). It can be opened as mutable or as read-only.
Inheritance: IDisposable
Ejemplo n.º 1
0
        public static AzureEventStore OpenExistingForReading(AzureStoreConfiguration config, EventStoreId container)
        {
            var blob  = config.GetPageBlob(container.Name + "/stream.dat");
            var check = AzureEventPointer.OpenReadable(blob);

            blob.FetchAttributes();
            var store = AzureEventStoreChunk.OpenExistingForReading(blob, blob.Properties.Length);

            return(new AzureEventStore(container, store, check));
        }
Ejemplo n.º 2
0
        public static AzureEventStore OpenExistingForWriting(AzureStoreConfiguration config, EventStoreId container)
        {
            var blob   = config.GetPageBlob(container.Name + "/stream.dat");
            var check  = AzureEventPointer.OpenWriteable(blob);
            var offset = check.Read();
            var length = blob.Properties.Length;
            var store  = AzureEventStoreChunk.OpenExistingForWriting(blob, offset, length);

            return(new AzureEventStore(container, store, check));
        }
Ejemplo n.º 3
0
        public static AzureEventStore CreateNewForWriting(AzureStoreConfiguration config, EventStoreId container)
        {
            var blob = config.GetPageBlob(container.Name + "/stream.dat");

            blob.Container.CreateIfNotExist();

            var store = AzureEventStoreChunk.CreateNewForWriting(blob);
            var check = AzureEventPointer.OpenWriteable(blob);

            return(new AzureEventStore(container, store, check));
        }
Ejemplo n.º 4
0
 public AzureEventStore(EventStoreId container, AzureEventStoreChunk store, AzureEventPointer checkpoint)
 {
     Container = container;
     _store = store;
     _checkpoint = checkpoint;
 }
Ejemplo n.º 5
0
 public AzureEventStore(EventStoreId container, AzureEventStoreChunk store, AzureEventPointer checkpoint)
 {
     Container   = container;
     _store      = store;
     _checkpoint = checkpoint;
 }