java.lang.Object
iu.auth.session.InMemorySessionStore
- All Implemented Interfaces:
IuDataStore
In-memory session store implementation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Purges all expired stored sessions. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
get
(byte[] key) Get the binary value representation from Redis stored for the given key.Iterable
<?> list()
Returns a listing of all entries in the data store (without contents).void
put
(byte[] key, byte[] data) Puts or deletes data represented by a given key.void
Write the given key/value pair to Redis and set the expiration time if defined.
-
Constructor Details
-
InMemorySessionStore
public InMemorySessionStore()Default constructor
-
-
Method Details
-
list
Description copied from interface:IuDataStore
Returns a listing of all entries in the data store (without contents).- Specified by:
list
in interfaceIuDataStore
- Returns:
- data entry listing
-
get
public byte[] get(byte[] key) Description copied from interface:IuDataStore
Get the binary value representation from Redis stored for the given key.- Specified by:
get
in interfaceIuDataStore
- Parameters:
key
- must not be null.- Returns:
- null if key does not exist.
-
put
public void put(byte[] key, byte[] data) Description copied from interface:IuDataStore
Puts or deletes data represented by a given key.- Specified by:
put
in interfaceIuDataStore
- Parameters:
key
- data keydata
- data to assign to the key, replaces existing data. May be null to delete existing data.
-
put
Description copied from interface:IuDataStore
Write the given key/value pair to Redis and set the expiration time if defined.- Specified by:
put
in interfaceIuDataStore
- Parameters:
key
- key for the cache entry. Must not be null.value
- value stored for the key. Must not be null.ttl
- optional expiration time. Can be null.
-