RegistrationTokenMap
class RegistrationTokenMap<T : RegistrationToken, V>(tokenFactory: (Int) -> T)
Content copied to clipboard
Utility class to generate unique tokens of type T and associate a value of type V to this token. Tokens are created by using the tokenFactory.
This class is thread-safe.
It is assumed tokens can be reused after a Int.MAX_VALUE rollover.
Constructors
Link copied to clipboard
fun <T : RegistrationToken> RegistrationTokenMap(tokenFactory: (Int) -> T)
Content copied to clipboard