Пример #1
0
        private void AcquireNextIdBatch()
        {
            IdAllocation allocation = _acquirer.acquireIds(_idType);

            Debug.Assert(allocation.IdRange.RangeLength > 0);
            _log.debug("Received id allocation " + allocation + " for " + _idType);
            StoreLocally(allocation);
        }
Пример #2
0
 private ReplicatedIdGeneratorFactory GetIdGenerationFactory(FileSystemAbstraction fileSystemAbstraction)
 {
     when(_idRangeAcquirer.acquireIds(IdType.NODE)).thenReturn(new IdAllocation(new IdRange(PrimitiveLongCollections.EMPTY_LONG_ARRAY, 0, 10000), 0, 0));
     return(new ReplicatedIdGeneratorFactory(fileSystemAbstraction, _idRangeAcquirer, NullLogProvider.Instance, new EnterpriseIdTypeConfigurationProvider(Config.defaults())));
 }