Esempio n. 1
0
        static AccountConfigurations EnsureAccounts(this ExposeSettings transportExtensions)
        {
            var settings = transportExtensions.GetSettings();

            if (settings.TryGet <AccountConfigurations>(out var accounts))
            {
                return(accounts);
            }

            accounts = new AccountConfigurations();
            settings.Set(accounts);
            return(accounts);
        }
Esempio n. 2
0
 public static void ShouldCacheEntities(this ExposeSettings settings, bool cache)
 {
     settings.GetSettings().Set("ShouldCacheEntities", cache);
 }
Esempio n. 3
0
 /// <summary>
 /// Sets how to generate stream ids throughout
 /// Parameters:
 /// - Type of entity
 /// - bucket
 /// - id
 /// Returns:
 /// - stream id
 /// </summary>
 /// <param name="settings"></param>
 /// <param name="generator"></param>
 public static void SetStreamGenerator(this ExposeSettings settings, StreamIdGenerator generator)
 {
     settings.GetSettings().Set("StreamGenerator", generator);
 }
Esempio n. 4
0
 /// <summary>
 /// When we have a version conflict with the store we can try to resolve it automatically.  This sets how many times we'll try
 /// Set to 0 to disable
 /// </summary>
 /// <param name="settings"></param>
 /// <param name="tries"></param>
 public static void MaxConflictResolves(this ExposeSettings settings, int tries)
 {
     settings.GetSettings().Set("MaxConflictResolves", tries);
 }
Esempio n. 5
0
 public static void SetProcessingParallelism(this ExposeSettings settings, Int32 Parallelism)
 {
     settings.GetSettings().Set("ProcessingParallelism", Parallelism);
 }
 public static void WithExtraStats(this ExposeSettings settings, bool use)
 {
     settings.GetSettings().Set("ExtraStats", use);
 }
Esempio n. 7
0
 /// <summary>
 /// The maximum amount of messages to keep in memory waiting to be executed
 /// </summary>
 public static void MaxDelayed(this ExposeSettings settings, int max)
 {
     settings.GetSettings().Set("MaxDelayed", max);
 }
Esempio n. 8
0
 public static void SetReadSize(this ExposeSettings settings, int count)
 {
     settings.GetSettings().Set("ReadSize", count);
 }
Esempio n. 9
0
 public static void MaxProcessingQueueSize(this ExposeSettings settings, Int32 Size)
 {
     settings.GetSettings().Set("MaxQueueSize", Size);
 }
Esempio n. 10
0
 public static void EventDropIsFatal(this ExposeSettings settings, Boolean Fatal)
 {
     settings.GetSettings().Set("EventDropIsFatal", Fatal);
 }
Esempio n. 11
0
 public static void MaxEventRetries(this ExposeSettings settings, Int32 Max)
 {
     settings.GetSettings().Set("MaxRetries", Max);
 }
Esempio n. 12
0
 public static void ParallelHandlers(this ExposeSettings settings, Boolean Parrallel)
 {
     settings.GetSettings().Set("ParallelHandlers", Parrallel);
 }
Esempio n. 13
0
 public static void SetBucketsHandled(this ExposeSettings settings, Int32 Count)
 {
     settings.GetSettings().Set("BucketsHandled", Count);
 }
Esempio n. 14
0
 public static void SetBucketExpiration(this ExposeSettings settings, Int32 Seconds)
 {
     settings.GetSettings().Set("BucketExpiration", Seconds);
 }
Esempio n. 15
0
 public static void SetBucketHeartbeats(this ExposeSettings settings, Int32 Seconds)
 {
     settings.GetSettings().Set("BucketHeartbeats", Seconds);
 }
Esempio n. 16
0
 public static void PublishOobToBus(this ExposeSettings settings, bool useOobNsb)
 {
     settings.GetSettings().Set("UseNsbForOob", true);
 }
Esempio n. 17
0
 public static void SlowAlertThreshold(this ExposeSettings settings, int milliseconds)
 {
     settings.GetSettings().Set("SlowAlertThreshold", milliseconds);
 }
Esempio n. 18
0
 /// <summary>
 /// Sets the interval to flush delayed messages when using IDelayedChannel
 /// If you don't want to write every delayed event to ES each UOW set this
 /// * Should be set lowish - depending on your load
 /// </summary>
 public static void DelayedFlushInterval(this ExposeSettings settings, TimeSpan interval)
 {
     settings.GetSettings().Set("FlushInterval", interval);
 }
Esempio n. 19
0
 public static void EnableSlowAlerts(this ExposeSettings settings, bool expose)
 {
     settings.GetSettings().Set("SlowAlerts", expose);
 }
Esempio n. 20
0
 /// <summary>
 /// Delayed message expiration
 /// When messages are delayed for bulk processing, only let them sit for this amount of time before flushing to eventstore for someone else to process
 /// </summary>
 public static void DelayedExpiration(this ExposeSettings settings, TimeSpan expiration)
 {
     settings.GetSettings().Set("DelayedExpiration", expiration);
 }
Esempio n. 21
0
 /// <summary>
 /// Compress events and messages using GZip (default snapshots only)
 /// </summary>
 /// <param name="settings"></param>
 /// <param name="compress"></param>
 public static void SetCompress(this ExposeSettings settings, Compression compress)
 {
     settings.GetSettings().Set("Compress", compress);
 }
Esempio n. 22
0
 public static void ShardedStore(this ExposeSettings settings, IEventStoreConnection[] connections)
 {
     settings.GetSettings().Set("Shards", connections);
 }
 public static void WithParallelEvents(this ExposeSettings settings, int concurrency)
 {
     settings.GetSettings().Set("ParallelEvents", concurrency);
 }
Esempio n. 24
0
 public static void SetHandlerParallelism(this ExposeSettings settings, Int32 Parallelism)
 {
     settings.GetSettings().Set("HandlerParallelism", Parallelism);
 }