Example #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);
        }
 public static void ShouldCacheEntities(this ExposeSettings settings, bool cache)
 {
     settings.GetSettings().Set("ShouldCacheEntities", cache);
 }
 /// <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);
 }
 /// <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);
 }
Example #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);
 }
Example #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);
 }
Example #8
0
 public static void SetReadSize(this ExposeSettings settings, int count)
 {
     settings.GetSettings().Set("ReadSize", count);
 }
Example #9
0
 public static void MaxProcessingQueueSize(this ExposeSettings settings, Int32 Size)
 {
     settings.GetSettings().Set("MaxQueueSize", Size);
 }
Example #10
0
 public static void EventDropIsFatal(this ExposeSettings settings, Boolean Fatal)
 {
     settings.GetSettings().Set("EventDropIsFatal", Fatal);
 }
Example #11
0
 public static void MaxEventRetries(this ExposeSettings settings, Int32 Max)
 {
     settings.GetSettings().Set("MaxRetries", Max);
 }
Example #12
0
 public static void ParallelHandlers(this ExposeSettings settings, Boolean Parrallel)
 {
     settings.GetSettings().Set("ParallelHandlers", Parrallel);
 }
Example #13
0
 public static void SetBucketsHandled(this ExposeSettings settings, Int32 Count)
 {
     settings.GetSettings().Set("BucketsHandled", Count);
 }
Example #14
0
 public static void SetBucketExpiration(this ExposeSettings settings, Int32 Seconds)
 {
     settings.GetSettings().Set("BucketExpiration", Seconds);
 }
Example #15
0
 public static void SetBucketHeartbeats(this ExposeSettings settings, Int32 Seconds)
 {
     settings.GetSettings().Set("BucketHeartbeats", Seconds);
 }
Example #16
0
 public static void PublishOobToBus(this ExposeSettings settings, bool useOobNsb)
 {
     settings.GetSettings().Set("UseNsbForOob", true);
 }
Example #17
0
 public static void SlowAlertThreshold(this ExposeSettings settings, int milliseconds)
 {
     settings.GetSettings().Set("SlowAlertThreshold", milliseconds);
 }
Example #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);
 }
Example #19
0
 public static void EnableSlowAlerts(this ExposeSettings settings, bool expose)
 {
     settings.GetSettings().Set("SlowAlerts", expose);
 }
Example #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);
 }
Example #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);
 }
Example #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);
 }
Example #24
0
 public static void SetHandlerParallelism(this ExposeSettings settings, Int32 Parallelism)
 {
     settings.GetSettings().Set("HandlerParallelism", Parallelism);
 }