示例#1
0
        public static ClusterBuilder WithSimpleStorage(this ClusterBuilder builder, string providerName, int numberStorageGrains = MemoryStorage.NumStorageGrainsDefaultValue)
        {
            var config = new Dictionary <string, string> {
                { MemoryStorage.NumStorageGrainsPropertyName, numberStorageGrains.ToString() }
            };

            return(new ClusterStorageDecorator <MemoryStorage>(builder, providerName, config));
        }
示例#2
0
 public EventHubStreamDecorator(ClusterBuilder builder, string providerName, string path, string hubConnectionString, string checkpointConnectionString, string checkpointNamespace, string checkpointTableName = "OrleansEventHubCheckpoint", string consumerGroup = "$Default", int checkpointIntervalSeconds = 5)
     : base(builder)
 {
     _providerName               = providerName;
     _path                       = path;
     _hubConnectionString        = hubConnectionString;
     _checkpointConnectionString = checkpointConnectionString;
     _checkpointTableName        = checkpointTableName;
     _checkpointNamespace        = checkpointNamespace;
     _consumerGroup              = consumerGroup;
     _checkpointInterval         = TimeSpan.FromSeconds(checkpointIntervalSeconds);
 }
示例#3
0
 public ClusterStorageDecorator(ClusterBuilder builder, string providerName, IDictionary <string, string> config = null)
     : base(builder)
 {
     _providerName = providerName ?? throw new ArgumentNullException(nameof(providerName));
     _config       = config ?? new Dictionary <string, string>();
 }
示例#4
0
 public SimpleStreamDecorator(ClusterBuilder builder, string providerName, bool fireAndForget = false)
     : base(builder)
 {
     _providerName  = providerName ?? throw new ArgumentNullException(nameof(providerName));
     _fireAndForget = fireAndForget;
 }
示例#5
0
 public SimpleReminderDecorator(ClusterBuilder builder)
     : base(builder)
 {
 }
示例#6
0
 public static ClusterBuilder WithSimpleReminders(this ClusterBuilder builder)
 {
     return(new SimpleReminderDecorator(builder));
 }
示例#7
0
 public static ClusterBuilder WithSimpleStream(this ClusterBuilder builder, string providerName, bool fireAndForget = false)
 {
     return(new SimpleStreamDecorator(builder, providerName, fireAndForget));
 }