Esempio n. 1
0
        /// <summary>
        /// NOTE: key name must be unique across entire project, including across types.
        /// </summary>
        protected GrainIndexManagerBase(string KeyName, int NumIndexerGrains, IKeyHashGenerator <TIndexKey> HashGenerator)
        {
#if DEBUG
            // This, of course, assumes index managers are singletons, which they should be anyway
            if (!GrainIndexKeyNameChecker.CheckAndAdd(KeyName))
            {
                throw new ArgumentException("Cannot use duplicate key names for indexing", nameof(KeyName));
            }
#endif

            this.keyName          = KeyName;
            this.numIndexerGrains = NumIndexerGrains;
            this.hashGenerator    = HashGenerator;
        }
Esempio n. 2
0
 public GrainIndexManager_Unique(string KeyName, int NumIndexerGrains, IKeyHashGenerator <TIndexKey> HashGenerator) : base(KeyName, NumIndexerGrains, HashGenerator)
 {
 }