public class ExpiringTokenStore
extends java.lang.Object
| Constructor and Description |
|---|
ExpiringTokenStore() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
createKeyAndPut(java.lang.String keyPrefix,
java.lang.Object value,
long expiryms)
Creates a mapping to the given value by creating a key with the given keyPrefix without colliding any existing keys.
|
java.lang.Object |
get(java.lang.Object key)
Returns the value to which the specified key is mapped, or null if this store contains no association for the key.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value,
long expiryms)
Associates the specified value with the specified key in this store.
|
java.lang.Object |
put(java.lang.Object key,
java.lang.Object value,
long expiry,
java.util.concurrent.TimeUnit unit)
Associates the specified value with the specified key in this store.
|
java.lang.Object |
remove(java.lang.Object key)
Removes the association for the specified key from this store if present.
|
public java.lang.Object put(java.lang.Object key,
java.lang.Object value,
long expiryms)
key - key with which the specified value is to be mappedvalue - value to be mapped with the specified keyexpiryms - the duration in ms the association is valid. After that time, it's removedpublic java.lang.Object put(java.lang.Object key,
java.lang.Object value,
long expiry,
java.util.concurrent.TimeUnit unit)
key - key with which the specified value is to be mappedvalue - value to be mapped with the specified keyexpiry - the duration in [unit] the association is valid. After that time, it's removedunit - unit for the expiry parameterpublic java.lang.String createKeyAndPut(java.lang.String keyPrefix,
java.lang.Object value,
long expiryms)
keyPrefix - the prefix the generated key should start withvalue - value to be mapped with the specified keyexpiryms - the duration in ms the association is valid. After that time, it's removedpublic java.lang.Object get(java.lang.Object key)
key - the key whose mapped value is to be returnedpublic java.lang.Object remove(java.lang.Object key)
key - the key whose mapped value is to be removedCopyright © 2000-2025 OAshi S.à r.l. All Rights Reserved.