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; }
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; }