public override void Open(IFile file, long pagePoolSize) 
        {
            if (opened) 
            {
                throw new StorageError(StorageError.ErrorCode.STORAGE_ALREADY_OPENED);
            }
            initialize(file, pagePoolSize);

            lck = new PersistentResource();
            init = new object();
            sync = new object();
            done = new object();
            commit = new object();
            listening = true;
            Connect();
            if (socket != null)
            {
                thread = new Thread(new ThreadStart(run));
                thread.Start();
                WaitSynchronizationCompletion();
                WaitInitializationCompletion();
            }
            opened = true;
            BeginThreadTransaction(TransactionMode.ReplicationSlave);
            reloadScheme();
            EndThreadTransaction();
        }
 public ExclusiveLock(PersistentResource res)
 {
     resource = res;
     res.ExclusiveLock();
 }
 public UpdateLock(PersistentResource res)
 {
     resource = res;
     res.UpdateLock();
 }
 public SharedLock(PersistentResource res)
 {
     resource = res;
     res.SharedLock();
 }
示例#5
0
 public ExclusiveLock(PersistentResource res)
 {
     resource = res;
     res.ExclusiveLock();
 }
示例#6
0
 public UpdateLock(PersistentResource res)
 {
     resource = res;
     res.UpdateLock();
 }
示例#7
0
 public SharedLock(PersistentResource res)
 {
     resource = res;
     res.SharedLock();
 }