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 classPurges 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).voidput(byte[] key, byte[] data) Puts or deletes data represented by a given key.voidWrite 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:IuDataStoreReturns a listing of all entries in the data store (without contents).- Specified by:
listin interfaceIuDataStore- Returns:
- data entry listing
-
get
public byte[] get(byte[] key) Description copied from interface:IuDataStoreGet the binary value representation from Redis stored for the given key.- Specified by:
getin 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:IuDataStorePuts or deletes data represented by a given key.- Specified by:
putin 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:IuDataStoreWrite the given key/value pair to Redis and set the expiration time if defined.- Specified by:
putin 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.
-