K
- type of the record keysAGG
- type of the aggregated valuespublic interface SessionStore<K,AGG> extends StateStore, ReadOnlySessionStore<K,AGG>
Modifier and Type | Method and Description |
---|---|
AGG |
fetchSession(K key,
long startTime,
long endTime)
Get the value of key from a single session.
|
KeyValueIterator<Windowed<K>,AGG> |
findSessions(K keyFrom,
K keyTo,
long earliestSessionEndTime,
long latestSessionStartTime)
Fetch any sessions in the given range of keys and the sessions end is ≥ earliestSessionEndTime and the sessions
start is ≤ latestSessionStartTime
This iterator must be closed after use.
|
KeyValueIterator<Windowed<K>,AGG> |
findSessions(K key,
long earliestSessionEndTime,
long latestSessionStartTime)
Fetch any sessions with the matching key and the sessions end is ≥ earliestSessionEndTime and the sessions
start is ≤ latestSessionStartTime
This iterator must be closed after use.
|
void |
put(Windowed<K> sessionKey,
AGG aggregate)
Write the aggregated value for the provided key to the store
|
void |
remove(Windowed<K> sessionKey)
Remove the session aggregated with provided
Windowed key from the store |
close, flush, init, isOpen, name, persistent
fetch, fetch
KeyValueIterator<Windowed<K>,AGG> findSessions(K key, long earliestSessionEndTime, long latestSessionStartTime)
key
- the key to return sessions forearliestSessionEndTime
- the end timestamp of the earliest session to search forlatestSessionStartTime
- the end timestamp of the latest session to search forjava.lang.NullPointerException
- If null is used for key.KeyValueIterator<Windowed<K>,AGG> findSessions(K keyFrom, K keyTo, long earliestSessionEndTime, long latestSessionStartTime)
keyFrom
- The first key that could be in the rangekeyTo
- The last key that could be in the rangeearliestSessionEndTime
- the end timestamp of the earliest session to search forlatestSessionStartTime
- the end timestamp of the latest session to search forjava.lang.NullPointerException
- If null is used for any key.AGG fetchSession(K key, long startTime, long endTime)
key
- the key to fetchstartTime
- start timestamp of the sessionendTime
- end timestamp of the sessionnull
if no session associated with the key can be foundjava.lang.NullPointerException
- If null
is used for any key.void remove(Windowed<K> sessionKey)
Windowed
key from the storesessionKey
- key of the session to removejava.lang.NullPointerException
- If null is used for sessionKey.void put(Windowed<K> sessionKey, AGG aggregate)
sessionKey
- key of the session to writeaggregate
- the aggregated value for the session, it can be null;
if the serialized bytes are also null it is interpreted as deletesjava.lang.NullPointerException
- If null is used for sessionKey.