Exemple #1
0
        public RaxLogTable(AbstractStorageFactory factory)
        {
            _factory = factory;

            _tableHeaderStorage = factory.CreateStorage(FILE_TABLE_BIN);
            _logsStorage        = factory.CreateStorage(FILE_LOGS);
            _categoriesStorage  = factory.CreateStorage(FILE_CATEGORIES);
            _logsDataStorage    = factory.CreateStorage(FILE_LOGS_DATA, AbstractStorageFactory.Parameters.AppendOnlyStorage);

            _categoriesByName      = new Dictionary <string, CategoryInformation>();
            _categoriesByIndex     = new Dictionary <long, CategoryInformation>();
            _indexYearStorages     = new Dictionary <int, AbstractStorage>();
            _yearMinutesIndexCache = new Dictionary <int, RaxTimeIndexEntry[]>();

            if (_tableHeaderStorage.Exist())
            {
                OpenExistingTable();
            }
            else
            {
                CreateNewTable();
            }
        }
Exemple #2
0
 public override bool Exist()
 => _appendOnlyDataStorage.Exist();