Package com.illumon.iris.auth
Class AuthenticationServerBase.TokenEntryList
java.lang.Object
com.illumon.iris.auth.AuthenticationServerBase.TokenEntryList
- Enclosing class:
- AuthenticationServerBase
Linked list to help when scanning for expired tokens. The
AuthenticationServerBase.TokenEntry objects will be added in order of
when they are created, so expired token scan can start at the head and stop when it finds a token that is not
expired.
TokenEntry objects are also removed in AuthenticationServerBase.isTokenValid(String, AuthToken) and those tokens may be anywhere
in this list. A LinkedList would work but TokenEntry removals would be O(n), whereas any random token
will be removed from this list in O(1) by calling detach(TokenEntry).-
Constructor Summary
ConstructorsConstructorDescriptionTokenEntryList(@NotNull com.fishlib.io.logger.Logger log, long timerPeriodSecs) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddNewTokenEntry(AuthenticationServerBase.TokenEntry tokenEntry) detach(AuthenticationServerBase.TokenEntry tokenEntry) getHead()boolean
-
Constructor Details
-
TokenEntryList
public TokenEntryList(@NotNull @NotNull com.fishlib.io.logger.Logger log, long timerPeriodSecs)
-
-
Method Details
-
isCleanedUp
-
addNewTokenEntry
-
getHead
-
detach
-