@Override public IdGenerator open( File filename, IdType idType, LongSupplier highId, long maxId ) { IdTypeConfiguration typeConfiguration = getIdTypeConfiguration( idType ); return open( filename, typeConfiguration.getGrabSize(), idType, highId, maxId ); }
@Override public IdGenerator open( File filename, int grabSize, IdType idType, LongSupplier highId, long maxId ) { assert boundaries != null : "Factory needs to be initialized before usage"; IdGenerator generator = delegate.open( filename, grabSize, idType, highId, maxId ); IdTypeConfiguration typeConfiguration = getIdTypeConfiguration(idType); if ( typeConfiguration.allowAggressiveReuse() ) { BufferingIdGenerator bufferingGenerator = new BufferingIdGenerator( generator ); bufferingGenerator.initialize( boundaries, safeThreshold ); overriddenIdGenerators[idType.ordinal()] = bufferingGenerator; generator = bufferingGenerator; } return generator; }
@Override public IdGenerator open( File filename, IdType idType, LongSupplier highId, long maxId ) { IdTypeConfiguration typeConfiguration = getIdTypeConfiguration( idType ); return open( filename, typeConfiguration.getGrabSize(), idType, highId, maxId ); }
@Override public IdGenerator open( File filename, int grabSize, IdType idType, LongSupplier highId, long maxId ) { assert boundaries != null : "Factory needs to be initialized before usage"; IdGenerator generator = delegate.open( filename, grabSize, idType, highId, maxId ); IdTypeConfiguration typeConfiguration = getIdTypeConfiguration(idType); if ( typeConfiguration.allowAggressiveReuse() ) { BufferingIdGenerator bufferingGenerator = new BufferingIdGenerator( generator ); bufferingGenerator.initialize( boundaries, safeThreshold ); overriddenIdGenerators[idType.ordinal()] = bufferingGenerator; generator = bufferingGenerator; } return generator; }