Example #1
0
 public override bool Initialize(StorageConfiguration configuration, StatsIdentity statsIdentity)
 {
     if (!configuration.StorageProvider.IsMultiFileStore)
     {
         configuration.StorageProvider.MaxFileSize = 3221225472;//3GB//MiscUtil.MAX_FILE_SIZE;
     }
     return(base.Initialize(configuration, statsIdentity));
 }
Example #2
0
        public MetadataIndex(StatsIdentity statsIdentity, IPersistenceProvider metadataPersister)
        {
            _keyToRowIndex  = new DoubleVector <DocumentKey, long>();
            _bucketKeyIndex = new HashVector <int, ClusteredList <DocumentKey> >();
            _enumerationSet = new ClusteredHashSet <long>();

            _statsCollector    = StatsManager.Instance.GetStatsCollector(statsIdentity);
            _metadataPersister = metadataPersister;
        }
Example #3
0
 public CacheSpace(long capacity, ICacheSpacePolicy spacePolicy, StatsIdentity statsIdentity)
 {
     _capacity       = capacity;
     _spacePolicy    = spacePolicy;
     _statsCollector = StatsManager.Instance.GetStatsCollector(statsIdentity);
     if (_statsCollector != null)
     {
         _statsCollector.SetStatsValue(StatisticsType.CacheSize, 0);
     }
 }
Example #4
0
        public virtual bool Initialize(StorageConfiguration configuration, StatsIdentity statsIdentity)
        {
            _userConfig = (StorageConfiguration)configuration.Clone();
            if (configuration == null || configuration.StorageProvider == null)
            {
                throw new ConfigurationException("PersistenceProvider configuration not found.");
            }

            _statsCollector = StatsManager.Instance.GetStatsCollector(statsIdentity);

            RegenerateMetaData();

            ITransaction transaction = _metadataPersister.BeginTransaction(null, false);

            CreateNextFile(transaction);
            _metadataPersister.Commit(transaction);

            DisplaySize();

            return(true);
        }
        internal StateTxfrCorresponder(NodeContext context, IDispatcher dispatcher, StateTransferIdentity identity, bool isLocal)//,String dbName,String colName,NodeIdentity requestingShard, StateTransferType transferType)
        {
            _context    = context;
            _dispatcher = dispatcher;
            _isLocal    = isLocal;
            if (_context != null)
            {
                _databasesManager = _context.DatabasesManager;
            }

            corresponderIdentity = identity;
            _currentBucketkeys   = new ClusteredList <DocumentKey>();
            // Create Collection for keeping keys being transfered
            collectionCreated = CreateBucketKeysCollection();

            transferedBuckets = new ConcurrentQueue <IResourceRemovalInfo>();

            _statsIdentity = new StatsIdentity(context.LocalShardName, corresponderIdentity.DBName);
            loggingModule  = corresponderIdentity.DBName + ":" + corresponderIdentity.ColName + ":" + GetType().ToString();

            _resourceID = Guid.NewGuid().ToString();
        }
Example #6
0
 /// <summary>
 /// Default constructor
 /// </summary>
 internal LRUEvictionPolicy(StatsIdentity statsIdentity)
 {
     Initialize();
     _statsCollector = StatsManager.Instance.GetStatsCollector(statsIdentity);
 }
Example #7
0
 public MetadataIndexDisk(StatsIdentity statsIdentity, IPersistenceProvider metadataPersister)
     : base(statsIdentity, metadataPersister)
 {
     _transactionRowIds = new ClusteredHashSet <long>();
     _keysDeleted       = new ClusteredHashSet <DocumentKey>();
 }