예제 #1
0
파일: MetaManager.cs 프로젝트: loubo/sones
        public static IMetaManager CreateMetaManager(IVertexStore myVertexStore, IDManager myIDManager, GraphDBPlugins myPlugins, GraphDBPluginManager myPluginManager, GraphApplicationSettings myApplicationSettings, TransactionToken myTransaction, SecurityToken mySecurity)
        {
            var result = new MetaManager(myVertexStore, myIDManager, myPluginManager, myPlugins, myApplicationSettings);

            DBCreationManager creationManager = new DBCreationManager(result.SystemSecurityToken, result.SystemTransactionToken);
            if (!creationManager.CheckBaseGraph(myVertexStore))
            {
                creationManager.CreateBaseGraph(myVertexStore);
            }

            result.Initialize();
            result.Load();

            SetMaxID(myVertexStore, myIDManager, myTransaction, mySecurity, result);

            return result;
        }
예제 #2
0
파일: MetaManager.cs 프로젝트: loubo/sones
 /// <summary>
 /// Creates a new meta manager 
 /// </summary>
 /// <param name="myVertexStore">The vertex store on which all other manager rely on</param>
 /// <param name="myPlugins">The plugin definitions</param>
 /// <param name="myPluginManager">Used to load pluginable manager</param>
 /// <param name="myApplicationSettings">The current application settings</param>
 private MetaManager(IVertexStore myVertexStore, IDManager myIDManager, GraphDBPluginManager myPluginManager, GraphDBPlugins myPlugins, GraphApplicationSettings myApplicationSettings)
 {
     _vertexStore = myVertexStore;
     _vertexTypeManager = new VertexTypeManager(myIDManager);
     _vertexManager = new VertexManager(myIDManager);
     _edgeTypeManager = new EdgeTypeManager(myIDManager);
     _queryPlanManager = new QueryPlanManager();
     _indexManager = new IndexManager(myIDManager, myPluginManager, myApplicationSettings, myPlugins.IndexPlugins);
 }
예제 #3
0
        public static IMetaManager CreateMetaManager(   IVertexStore myVertexStore, 
                                                        IDManager myIDManager, 
                                                        GraphDBPlugins myPlugins, 
                                                        GraphDBPluginManager myPluginManager, 
                                                        GraphApplicationSettings myApplicationSettings, 
                                                        ITransactionable myTransactionManager, 
                                                        SecurityToken mySecurity)
        {
            var result = new MetaManager(myVertexStore, myIDManager, myPluginManager, myPlugins, myApplicationSettings);

            var transactionID = myTransactionManager.BeginTransaction(mySecurity);

            DBCreationManager creationManager = new DBCreationManager(  result.SystemSecurityToken,
                                                                        transactionID, 
                                                                        result._baseGraphStorageManager);
            
            if (!creationManager.CheckBaseGraph(myVertexStore))
            {
                creationManager.CreateBaseGraph(myVertexStore);
            }

            creationManager.AddUserDefinedDataTypes(myVertexStore, myPluginManager);
            
            result.Initialize();
            result.Load(transactionID);

            SetMaxID(myVertexStore, myIDManager, transactionID, mySecurity, result);

            myTransactionManager.CommitTransaction(mySecurity, transactionID);

            return result;
        }