private void AcquireNextIdBatch() { IdAllocation allocation = _acquirer.acquireIds(_idType); Debug.Assert(allocation.IdRange.RangeLength > 0); _log.debug("Received id allocation " + allocation + " for " + _idType); StoreLocally(allocation); }
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()))); }