Example #1
0
 public Subscription(Guid id, string name, Topic topic, long completedMessageId,
                     ISubscriptionPointersStorage subscriptionPointersStorage)
 {
     this.id    = id;
     this.name  = name;
     this.topic = topic;
     this.completedMessageId          = completedMessageId;
     this.subscriptionPointersStorage = subscriptionPointersStorage;
 }
Example #2
0
 internal Topic(string name, IPersistentStorage persistentStorage,
                ISubscriptionsConfigurationStorage subscriptionsConfigurationStorage,
                ISubscriptionPointersStorage subscriptionPointersStorage,
                TopicOptions topicOptions)
 {
     this.name = name;
     this.persistentStorage = persistentStorage;
     this.subscriptionsConfigurationStorage = subscriptionsConfigurationStorage;
     this.subscriptionPointersStorage       = subscriptionPointersStorage;
     persistenceIntervalMilliseconds        = topicOptions.PersistenceIntervalMilliseconds;
     persistenceMaxFails = topicOptions.PersistenceMaxFails;
     cleanupMaxFails     = topicOptions.CleanupMaxFails;
     subscriptionPointersFlushMaxFails = topicOptions.SubscriptionPointersFlushMaxFails;
     dataArrayOptions               = new InfiniteArrayOptions(topicOptions.DataArrayOptions);
     writers                        = new HashSet <TopicWriter>();
     subscriptions                  = new Dictionary <string, Subscription>();
     cancellationTokenSource        = new CancellationTokenSource();
     lastFreeToId                   = 1;
     stopping                       = false;
     persistenceFails               = 0;
     cleanupFails                   = 0;
     subscriptionPointersFlushFails = 0;
 }