async Task IMembershipTable.InitializeMembershipTable(bool tryInitTableVersion)
        {
            session = await CassandraSessionFactory.CreateSession(options.ConnectionString);

            queries = await OrleansQueries.CreateInstance(session);

            if (tryInitTableVersion)
            {
                await session.ExecuteAsync(queries.InsertMembershipVersion());
            }
        }
コード例 #2
0
        async Task Init(CancellationToken cancellationToken)
        {
            if (string.IsNullOrEmpty(options.ConnctionString))
            {
                throw new BadProviderConfigException($"Connection string not specified for cassandra grain storage '{name}'.");
            }

            foreach (var providerInfo in options.SerializationProviders.Values)
            {
                providerInfo.provider.Init(providerRuntime);
            }

            if (options.SerializationProviders.Count == 1)
            {
                logger.Warn(0, $"No serialization providers have been specified, will use default serialzer " +
                            $"on top of Orleans serialization. This serializer does NOT support versioning. Specify " +
                            $"custom providers using `CassandraGrainStorageOptions.AddSerializationProvider`.");
            }

            session = await CassandraSessionFactory.CreateSession(options.ConnctionString);

            queries = await OrleansQueries.CreateInstance(session);
        }
コード例 #3
0
        async Task IGatewayListProvider.InitializeGatewayListProvider()
        {
            session = await CassandraSessionFactory.CreateSession(options.ConnectionString);

            queries = await OrleansQueries.CreateInstance(session);
        }
コード例 #4
0
        public async Task Init()
        {
            session = await CassandraSessionFactory.CreateSession(options.ConnectionString);

            queries = await OrleansQueries.CreateInstance(session);
        }