From 0e1f144bf4519463f6fcc968009c032c7eee02dc Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 15 Oct 2021 17:08:43 +0900 Subject: [PATCH] Rename `ArchiveModelImporter` with `Realm` prefix to avoid confusion --- osu.Game/Stores/BeatmapImporter.cs | 2 +- ...veModelImporter.cs => RealmArchiveModelImporter.cs} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename osu.Game/Stores/{ArchiveModelImporter.cs => RealmArchiveModelImporter.cs} (98%) diff --git a/osu.Game/Stores/BeatmapImporter.cs b/osu.Game/Stores/BeatmapImporter.cs index 2b8615f072..33276bff2f 100644 --- a/osu.Game/Stores/BeatmapImporter.cs +++ b/osu.Game/Stores/BeatmapImporter.cs @@ -34,7 +34,7 @@ namespace osu.Game.Stores /// Handles the storage and retrieval of Beatmaps/WorkingBeatmaps. /// [ExcludeFromDynamicCompile] - public class BeatmapImporter : ArchiveModelImporter, IDisposable + public class BeatmapImporter : RealmArchiveModelImporter, IDisposable { public override IEnumerable HandledExtensions => new[] { ".osz" }; diff --git a/osu.Game/Stores/ArchiveModelImporter.cs b/osu.Game/Stores/RealmArchiveModelImporter.cs similarity index 98% rename from osu.Game/Stores/ArchiveModelImporter.cs rename to osu.Game/Stores/RealmArchiveModelImporter.cs index 640a031e42..cc61896ea5 100644 --- a/osu.Game/Stores/ArchiveModelImporter.cs +++ b/osu.Game/Stores/RealmArchiveModelImporter.cs @@ -29,7 +29,7 @@ namespace osu.Game.Stores /// Adds cross-functionality with to give access to the central file store for the provided model. /// /// The model type. - public abstract class ArchiveModelImporter : IModelImporter + public abstract class RealmArchiveModelImporter : IModelImporter where TModel : RealmObject, IHasRealmFiles, IHasGuidPrimaryKey, ISoftDelete { private const int import_queue_request_concurrency = 1; @@ -40,20 +40,20 @@ namespace osu.Game.Stores private const int low_priority_import_batch_size = 1; /// - /// A singleton scheduler shared by all . + /// A singleton scheduler shared by all . /// /// /// This scheduler generally performs IO and CPU intensive work so concurrency is limited harshly. /// It is mainly being used as a queue mechanism for large imports. /// - private static readonly ThreadedTaskScheduler import_scheduler = new ThreadedTaskScheduler(import_queue_request_concurrency, nameof(ArchiveModelImporter)); + private static readonly ThreadedTaskScheduler import_scheduler = new ThreadedTaskScheduler(import_queue_request_concurrency, nameof(RealmArchiveModelImporter)); /// /// A second scheduler for lower priority imports. /// For simplicity, these will just run in parallel with normal priority imports, but a future refactor would see this implemented via a custom scheduler/queue. /// See https://gist.github.com/peppy/f0e118a14751fc832ca30dd48ba3876b for an incomplete version of this. /// - private static readonly ThreadedTaskScheduler import_scheduler_low_priority = new ThreadedTaskScheduler(import_queue_request_concurrency, nameof(ArchiveModelImporter)); + private static readonly ThreadedTaskScheduler import_scheduler_low_priority = new ThreadedTaskScheduler(import_queue_request_concurrency, nameof(RealmArchiveModelImporter)); public virtual IEnumerable HandledExtensions => new[] { @".zip" }; @@ -71,7 +71,7 @@ namespace osu.Game.Stores /// public Action? PostNotification { protected get; set; } - protected ArchiveModelImporter(Storage storage, RealmContextFactory contextFactory) + protected RealmArchiveModelImporter(Storage storage, RealmContextFactory contextFactory) { ContextFactory = contextFactory;