Esempio n. 1
0
 public SyncService(SyncProfile opts, IIndexMapper indexer, IFileManager filemanager, bool simulate, string thismachine)
 {
     _localSettings = opts.GetParticipant(thismachine);
     LocalPath = _localSettings.LocalPath;
     SharedPath = _localSettings.SharedPath;
     NumPeers = 0;
     FileCounts = new Dictionary<string, int>();
     SizeLimit = opts.ReserveSpace;
     Simulate = simulate;
     FileSearches = opts.SearchPatterns;
     if (FileSearches.Count == 0)
     {
         FileSearches.Add("*.*");
     }
     _sizecache = 0;
     _options = opts;
     if (Simulate)
     {
         _copyq = new MockFileManager();
         _indexer = new MockIndexMapper();
     }
     else
     {
         _copyq = filemanager;
         _indexer = indexer;
     }
     _log = new List<string>();
 }
Esempio n. 2
0
        /// <summary>
        /// Constructor for build index.
        /// Based on BuildIndexParams objects of different internal objects will be created.
        /// </summary>
        /// <param name="provisioner">Provisioner object</param>
        /// <param name="contracter">Contracter object</param>
        /// <param name="indexMapper">Index Mapper object</param>
        /// <param name="buildIndexParams">Parameters for building the index</param>

        public IndexBuilder(IFileContracter contracter,
                            IIndexMapper indexMapper,
                            IndexBuilderParams indexBuilderParams)
        {
            m_indexInitialized = false;
            m_IndexName        = indexBuilderParams.Index;
            m_fileContracter   = contracter;
            // TODO: [Satish - 7/22/2014] Pass the correct mapper from feeder service appropriately.
            m_indexMapper        = indexMapper;
            m_indexBuilderParams = indexBuilderParams;
        }
        /// <summary>
        /// Constructs a new asynchronous file copy service.
        /// </summary>
        public QueuedDiskCopier(SyncProfile profile, IIndexMapper indexer, string participant)
        {
            InProgressActions = new List<IAsyncResult>();
            PendingFileActions = new Queue<SyncOperation>();
            MaxActions = 2;

            _errors = new List<Exception>();

            _profile = profile;
            _localSettings = profile.GetParticipant(participant);
        }
Esempio n. 4
0
 public SchemaReader(IForeignKeyMapper foreignKeyMapper, IColumnMapper columnMapper, IIndexMapper indexMapper)
 {
     _foreignKeyMapper = foreignKeyMapper;
     _columnMapper = columnMapper;
     _indexMapper = indexMapper;
 }