コード例 #1
0
 public WriteCache(ICacheDBHandler <KeyType, ValueType> DBHandler)
 {
     this.DBHandler   = DBHandler;
     this.ExecuteType = DBHandler.ExecuteType;
     this.DBHandler.SaveResultCallback += new SaveResultCallbackHandler <KeyType, ValueType>(DBHandler_SaveResultCallback);
     SaveThread = new Thread(new ThreadStart(SaveData));
     SaveThread.Start();
 }
コード例 #2
0
        public Cache(ICacheDBHandler <KeyType, ValueType> DBHandler)
        {
            DBWriter       = new WriteCache <KeyType, ValueType>(DBHandler);
            this.DBHandler = DBHandler;
            MaxIdentity    = DBHandler.GetMaxID <ValueType>();
            GetNewIdentity();// ID++

            DBWriter.OnDiscardData += new WriteCache <KeyType, ValueType> .OnDiscardDataHandler(DBWriter_OnDiscardData);
        }