Klasse GroupSuggestionCache

java.lang.Object
de.delinkedde.areashopreborn.command.GroupSuggestionCache

public final class GroupSuggestionCache extends Object
Maintains an immutable non-blocking snapshot of persistent region-group names.
  • Konstruktordetails

    • GroupSuggestionCache

      public GroupSuggestionCache(Database database, RegionGroupRepository groups, int maximumEntries)
      Creates an empty group-name cache.
      Parameter:
      database - asynchronous database executor
      groups - group repository
      maximumEntries - maximum names retained by the cache
  • Methodendetails

    • refresh

      public CompletableFuture<Integer> refresh()
      Refreshes group names asynchronously.
      Gibt zurück:
      future containing cached group count
    • names

      public List<String> names()
      Returns the current stable group-name snapshot.
      Gibt zurück:
      immutable names