Promotion background
Easter Season IS HERE!
10% off limited time offer!
Ends in
00
H
00
M
00
S
limited time offer SAVE 10% NOW →
Packages com.phoenixplugins.phoenixcrates.api managers
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 and Description
      @Range(from=0L,to=2147483647L) int countRegisteredKeys()
      Returns the number of registered keys.
      @Nullable Key getKeyByIdentifier(String identifier)
      Retrieves a registered key by its identifier.
      @NotNull Set<String> getKeysIdentifier()
      Returns a snapshot set of all registered key identifiers.
      @NotNull List<? extends Key> getRegisteredKeys()
      Returns a snapshot list of registered keys.
    • Method Detail

      • 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

        @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 about 3 hours ago
My Cart (0 items)

Oops... looks like the spiders padded through here

Add products to your cart and remove them from here Lets buy
This site uses cookies to personalize content, enhance your experience. By continuing, you agree to our cookie use. Learn more