Oops... looks like the spiders padded through here
Add products to your cart and remove them from here Lets buypublic interface KeysManager
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.
| 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.
|
@NotNull @NotNull List<? extends Key> getRegisteredKeys()
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.
Key instances (never null).@Range(from=0L,to=2147483647L) int countRegisteredKeys()
This is typically a fast operation (no mapping/copy) and is preferred when only the count is required.
@NotNull @NotNull Set<String> getKeysIdentifier()
Like getRegisteredKeys(), this usually performs a map/copy from the internal
cache to a Set of identifiers — avoid calling repeatedly in hot paths.
@Nullable @Nullable Key getKeyByIdentifier(String identifier)
The reference implementation performs case-insensitive matching; callers should
tolerate null if the key is not present.
identifier - the key identifier to look upKey if found, otherwise null
Oops... looks like the spiders padded through here
Add products to your cart and remove them from here Lets buy