Ejemplo n.º 1
0
 public void Configure(ISiloBuilder hostBuilder)
 {
     // we use a slowed-down memory storage provider
     hostBuilder
     .AddLogStorageBasedLogConsistencyProvider("LogStorage")
     .AddStateStorageBasedLogConsistencyProvider("StateStorage")
     .ConfigureLogging(builder =>
     {
         builder.AddFilter(typeof(MemoryGrainStorage).FullName, LogLevel.Debug);
         builder.AddFilter(typeof(LogConsistencyProvider).Namespace, LogLevel.Debug);
     })
     .AddMemoryGrainStorageAsDefault()
     .AddMemoryGrainStorage("MemoryStore")
     .AddFaultInjectionMemoryStorage("SlowMemoryStore", options => options.NumStorageGrains = 10, faultyOptions => faultyOptions.Latency = TimeSpan.FromMilliseconds(15));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds a log storage log consistency provider as default consistency provider"/>
 /// </summary>
 public static ISiloBuilder AddLogStorageBasedLogConsistencyProviderAsDefault(this ISiloBuilder builder)
 {
     return(builder.AddLogStorageBasedLogConsistencyProvider(ProviderConstants.DEFAULT_STORAGE_PROVIDER_NAME));
 }