Example #1
0
 public NonFaultTolerantWorkflowIndexedState(
     IServiceProvider sp,
     IIndexedStateConfiguration config
     ) : base(sp, config)
 {
     base.getWorkflowIdFunc = () => Guid.NewGuid();
 }
Example #2
0
 public FaultTolerantWorkflowIndexedState(
     IServiceProvider sp,
     IIndexedStateConfiguration config,
     IGrainFactory grainFactory
     ) : base(sp, config)
 {
     this._grainFactory     = grainFactory;
     base.getWorkflowIdFunc = () => this.GenerateUniqueWorkflowId();
 }
Example #3
0
        public TransactionalIndexedState(
            IServiceProvider sp,
            IIndexedStateConfiguration config,
            IGrainActivationContext context,
            ITransactionalStateFactory transactionalStateFactory
            ) : base(sp, config, context)
        {
            var transactionalStateConfig = new IndexingTransactionalStateConfiguration(config.StateName, config.StorageName);

            this.transactionalState = transactionalStateFactory.Create <IndexedGrainStateWrapper <TGrainState> >(transactionalStateConfig);
        }
Example #4
0
        public Factory <IGrainActivationContext, object> GetFactory(MethodInfo creator, ParameterInfo parameter, IIndexedStateConfiguration indexingConfig)
        {
            // Use generic type args to specialize the generic method and create the factory lambda.
            var genericCreate = creator.MakeGenericMethod(parameter.ParameterType.GetGenericArguments());
            var args          = new object[] { indexingConfig };

            return(context => this.Create(context, genericCreate, args));
        }
 public WorkflowIndexedStateBase(IServiceProvider sp, IIndexedStateConfiguration config, IGrainActivationContext context)
     : base(sp, config, context)
 {
 }
Example #6
0
 public WorkflowIndexedStateBase(IServiceProvider sp, IIndexedStateConfiguration config)
 {
     this.ServiceProvider    = sp;
     this.IndexedStateConfig = config;
 }
Example #7
0
 public IndexedStateBase(IServiceProvider sp, IIndexedStateConfiguration config, IGrainActivationContext context)
 {
     this.ServiceProvider        = sp;
     this.IndexedStateConfig     = config;
     this.grainActivationContext = context;
 }