예제 #1
0
        public BackendManager(string backendurl, Options options, IBackendWriter statwriter, LocalDatabase database)
        {
            m_options = options;
            m_backendurl = backendurl;
            m_statwriter = statwriter;
            m_taskControl = statwriter as BasicResults;
            m_db = new DatabaseCollector(database, statwriter);

            m_backend = DynamicLoader.BackendLoader.GetBackend(m_backendurl, m_options.RawOptions);
            if (m_backend == null)
                throw new Exception(string.Format("Backend not supported: {0}", m_backendurl));

            if (!m_options.NoEncryption)
            {
                m_encryption = DynamicLoader.EncryptionLoader.GetModule(m_options.EncryptionModule, m_options.Passphrase, m_options.RawOptions);
                if (m_encryption == null)
                    throw new Exception(string.Format("Encryption method not supported: ", m_options.EncryptionModule));
            }

            if (m_taskControl != null)
                m_taskControl.StateChangedEvent += (state) => {
                    if (state == TaskControlState.Abort)
                        m_thread.Abort();
                };
            m_queue = new BlockingQueue<FileEntryItem>(options.SynchronousUpload ? 1 : (options.AsynchronousUploadLimit == 0 ? int.MaxValue : options.AsynchronousUploadLimit));
            m_thread = new System.Threading.Thread(this.ThreadRun);
            m_thread.Name = "Backend Async Worker";
            m_thread.IsBackground = true;
            m_thread.Start();
        }
예제 #2
0
 public RecreateDatabaseResults(BasicResults p) : base(p) { }
예제 #3
0
 public DeleteResults(BasicResults p) : base(p) { }
예제 #4
0
 public BasicResults(BasicResults p)
 { 
     this.BeginTime = DateTime.UtcNow; 
     this.m_parent = p;
 }
예제 #5
0
 public BasicResults() 
 { 
     this.BeginTime = DateTime.UtcNow; 
     this.m_parent = null;
     m_messages = new Library.Utility.FileBackedStringList();
     m_warnings = new Library.Utility.FileBackedStringList();
     m_errors = new Library.Utility.FileBackedStringList();
     m_retryAttempts = new Library.Utility.FileBackedStringList();
     m_dbqueue = new Queue<DbMessage>();
     m_backendStatistics = new BackendWriter(this);
     m_callerThread = System.Threading.Thread.CurrentThread;
     m_backendProgressUpdater = new BackendProgressUpdater();
     m_operationProgressUpdater = new OperationProgressUpdater();
 }
예제 #6
0
 public BasicResults(BasicResults p)
 {
     this.BeginTime = DateTime.UtcNow;
     this.m_parent  = p;
 }
예제 #7
0
 public BackendWriter(BasicResults p) : base(p)
 {
 }
예제 #8
0
 public BackendWriter(BasicResults p) : base(p) { }
예제 #9
0
 public DeleteResults(BasicResults p) : base(p)
 {
 }
예제 #10
0
 public RecreateDatabaseResults(BasicResults p) : base(p)
 {
 }
예제 #11
0
 protected BasicResults(BasicResults p)
 {
     this.BeginTime = DateTime.UtcNow;
     this.m_parent  = p;
 }
예제 #12
0
 public PurgeFilesResults(BasicResults p) : base(p)
 {
 }
예제 #13
0
 public TestResults(BasicResults p) : base(p)
 {
 }
예제 #14
0
 public RepairResults(BasicResults p) : base(p) { }
예제 #15
0
 public RepairResults(BasicResults p) : base(p)
 {
 }
예제 #16
0
 public CompactResults(BasicResults p) : base(p) { }
예제 #17
0
 public CompactResults(BasicResults p) : base(p)
 {
 }
예제 #18
0
 public TestResults(BasicResults p) : base(p) { }
예제 #19
0
 public VacuumResults(BasicResults p) : base(p)
 {
 }