Skip to content

Commit 329431d

Browse files
committed
Rename createXyzCollection DefaultStorageHandler.
1 parent 7f2c0b2 commit 329431d

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

here-naksha-lib-handlers/src/main/java/com/here/naksha/lib/handlers/DefaultStorageHandler.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ private Result retryDueToMissingCollection(
416416
logger.info(
417417
"Collection auto creation is enabled, attempting to create collection specified in request: {}",
418418
collection.getId());
419-
measuredStorageRunnable(() -> createXyzCollection(ctx, storageImpl, collection), storageTimer);
419+
measuredStorageRunnable(() -> createMissingXyzCollection(ctx, storageImpl, collection), storageTimer);
420420
logger.info("Created collection {}, forwarding the request once again", collection.getId());
421421
return forwardRequestToStorage(
422422
ctx, request, storageImpl, collection, ATTEMPT_AFTER_COLLECTION_CREATION, storageTimer);
@@ -482,12 +482,12 @@ private void applyCollectionId(Request<?> request, @NotNull String customCollect
482482
.filter(Objects::nonNull);
483483
}
484484

485-
private void createXyzCollection(
485+
protected void createMissingXyzCollection(
486486
final @NotNull NakshaContext ctx,
487487
final @NotNull IStorage storageImpl,
488488
final @NotNull XyzCollection collection) {
489489
try (final IWriteSession writer = storageImpl.newWriteSession(ctx, true)) {
490-
final Result result = writer.execute(createRequestForMissingCollections(collection));
490+
final Result result = writer.execute(createWriteCollectionsRequest(collection));
491491
if (result instanceof SuccessResult) {
492492
writer.commit(true);
493493
} else {
@@ -501,10 +501,6 @@ private void createXyzCollection(
501501
}
502502
}
503503

504-
protected @NotNull WriteXyzCollections createRequestForMissingCollections(final @NotNull XyzCollection collection) {
505-
return RequestHelper.createWriteCollectionsRequest(collection);
506-
}
507-
508504
enum OperationAttempt {
509505
FIRST_ATTEMPT,
510506
ATTEMPT_AFTER_STORAGE_INITIALIZATION,

0 commit comments

Comments
 (0)