Packages com.phoenixplugins.phoenixcrates.api managers

Interface KeysManager


public interface KeysManager
Class for accessing and managing crate keys.

Implementations manage caching, file I/O and lifecycle internally; only the methods exposed here are intended for consumers. Methods that return collections provide defensive copies/snapshots — they may perform mapping/copy operations, so avoid calling them repeatedly in performance-sensitive code.

  • Method Summary

    Modifier and Type
    Method
    Description
    @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int
    Returns the number of registered keys.
    @Nullable Key
    getKeyByIdentifier(String identifier)
    Retrieves a registered key by its identifier.
    @NotNull Set<String>
    Returns a snapshot set of all registered key identifiers.
    @NotNull List<? extends Key>
    Returns a snapshot list of registered keys.
  • Method Details

    • getRegisteredKeys

      @NotNull @NotNull List<? extends Key> getRegisteredKeys()
      Returns a snapshot list of registered keys.

      NOTE: The reference implementation maps an internal cache (e.g. CachedKey) to Key instances and returns a new list. This mapping/copy operation can be relatively expensive — if you only need the number of keys, use countRegisteredKeys() which returns the count without performing the mapping.

      Returns:
      a defensive-copy list of registered Key instances (never null).
    • countRegisteredKeys

      @org.jetbrains.annotations.Range(from=0L, to=2147483647L) int countRegisteredKeys()
      Returns the number of registered keys.

      This is typically a fast operation (no mapping/copy) and is preferred when only the count is required.

      Returns:
      number of registered keys
    • getKeysIdentifier

      @NotNull @NotNull Set<String> getKeysIdentifier()
      Returns a snapshot set of all registered key identifiers.

      Like getRegisteredKeys(), this usually performs a map/copy from the internal cache to a Set of identifiers — avoid calling repeatedly in hot paths.

      Returns:
      a defensive-copy set of key identifiers (never null).
    • getKeyByIdentifier

      @Nullable @Nullable Key getKeyByIdentifier(String identifier)
      Retrieves a registered key by its identifier.

      The reference implementation performs case-insensitive matching; callers should tolerate null if the key is not present.

      Parameters:
      identifier - the key identifier to look up
      Returns:
      the Key if found, otherwise null
Last updated 10 days ago
My Cart
Spider

Your cart is empty

Looks like the spiders padded through here. Pick a plugin and it will show up here. Continue shopping