Interface ReadOnlySessionStore<K,AGG>
- Type Parameters:
K
- the key typeAGG
- the aggregated value type
- All Known Subinterfaces:
SessionStore<K,
AGG>
-
Method Summary
Modifier and TypeMethodDescriptiondefault KeyValueIterator<Windowed<K>,
AGG> backwardFetch
(K key) Retrieve all aggregated sessions for the provided key.default KeyValueIterator<Windowed<K>,
AGG> backwardFetch
(K keyFrom, K keyTo) Retrieve all aggregated sessions for the given range of keys.default KeyValueIterator<Windowed<K>,
AGG> backwardFindSessions
(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 iterating from latest to earliest.default KeyValueIterator<Windowed<K>,
AGG> backwardFindSessions
(K key, Instant earliestSessionEndTime, Instant latestSessionStartTime) Fetch any sessions with the matching key and the sessions end is ≥ earliestSessionEndTime and the sessions start is ≤ latestSessionStartTime iterating from latest to earliest.default KeyValueIterator<Windowed<K>,
AGG> backwardFindSessions
(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 iterating from latest to earliest.default KeyValueIterator<Windowed<K>,
AGG> backwardFindSessions
(K keyFrom, K keyTo, Instant earliestSessionEndTime, Instant latestSessionStartTime) Fetch any sessions in the given range of keys and the sessions end is ≥ earliestSessionEndTime and the sessions start is ≤ latestSessionStartTime iterating from latest to earliest.Retrieve all aggregated sessions for the provided key.Retrieve all aggregated sessions for the given range of keys.default AGG
fetchSession
(K key, long sessionStartTime, long sessionEndTime) Get the value of key from a single session.default AGG
fetchSession
(K key, Instant sessionStartTime, Instant sessionEndTime) Get the value of key from a single session.default 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 iterating from earliest to latest.default KeyValueIterator<Windowed<K>,
AGG> findSessions
(K key, Instant earliestSessionEndTime, Instant latestSessionStartTime) Fetch any sessions with the matching key and the sessions end is ≥ earliestSessionEndTime and the sessions start is ≤ latestSessionStartTime iterating from earliest to latest.default 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 iterating from earliest to latest.default KeyValueIterator<Windowed<K>,
AGG> findSessions
(K keyFrom, K keyTo, Instant earliestSessionEndTime, Instant latestSessionStartTime) Fetch any sessions in the given range of keys and the sessions end is ≥ earliestSessionEndTime and the sessions start is ≤ latestSessionStartTime iterating from earliest to latest.
-
Method Details
-
findSessions
default 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 iterating from earliest to latest. I.e., earliestSessionEndTime is the lower bound of the search interval and latestSessionStartTime is the upper bound of the search interval, and the method returns all sessions that overlap with the search interval. Thus, if a session ends before earliestSessionEndTime, or starts after latestSessionStartTime if won't be contained in the result:earliestSessionEndTime: ESET latestSessionStartTime: LSST [ESET............LSST] [not-included] [included] [included] [included] [not-included]
This iterator must be closed after use.
- Parameters:
key
- the key to return sessions forearliestSessionEndTime
- the end timestamp of the earliest session to search for, where iteration starts.latestSessionStartTime
- the end timestamp of the latest session to search for, where iteration ends.- Returns:
- iterator of sessions with the matching key and aggregated values, from earliest to latest session time.
- Throws:
NullPointerException
- If null is used for key.
-
findSessions
default KeyValueIterator<Windowed<K>,AGG> findSessions(K key, Instant earliestSessionEndTime, Instant latestSessionStartTime) Fetch any sessions with the matching key and the sessions end is ≥ earliestSessionEndTime and the sessions start is ≤ latestSessionStartTime iterating from earliest to latest. I.e., earliestSessionEndTime is the lower bound of the search interval and latestSessionStartTime is the upper bound of the search interval, and the method returns all sessions that overlap with the search interval. Thus, if a session ends before earliestSessionEndTime, or starts after latestSessionStartTime if won't be contained in the result:earliestSessionEndTime: ESET latestSessionStartTime: LSST [ESET............LSST] [not-included] [included] [included] [included] [not-included]
This iterator must be closed after use.
- Parameters:
key
- the key to return sessions forearliestSessionEndTime
- the end timestamp of the earliest session to search for, where iteration starts.latestSessionStartTime
- the end timestamp of the latest session to search for, where iteration ends.- Returns:
- iterator of sessions with the matching key and aggregated values, from earliest to latest session time.
- Throws:
NullPointerException
- If null is used for key.
-
backwardFindSessions
default KeyValueIterator<Windowed<K>,AGG> backwardFindSessions(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 iterating from latest to earliest. I.e., earliestSessionEndTime is the lower bound of the search interval and latestSessionStartTime is the upper bound of the search interval, and the method returns all sessions that overlap with the search interval. Thus, if a session ends before earliestSessionEndTime, or starts after latestSessionStartTime if won't be contained in the result:earliestSessionEndTime: ESET latestSessionStartTime: LSST [ESET............LSST] [not-included] [included] [included] [included] [not-included]
This iterator must be closed after use.
- Parameters:
key
- the key to return sessions forearliestSessionEndTime
- the end timestamp of the earliest session to search for, where iteration ends.latestSessionStartTime
- the end timestamp of the latest session to search for, where iteration starts.- Returns:
- backward iterator of sessions with the matching key and aggregated values, from latest to earliest session time.
- Throws:
NullPointerException
- If null is used for key.
-
backwardFindSessions
default KeyValueIterator<Windowed<K>,AGG> backwardFindSessions(K key, Instant earliestSessionEndTime, Instant latestSessionStartTime) Fetch any sessions with the matching key and the sessions end is ≥ earliestSessionEndTime and the sessions start is ≤ latestSessionStartTime iterating from latest to earliest. I.e., earliestSessionEndTime is the lower bound of the search interval and latestSessionStartTime is the upper bound of the search interval, and the method returns all sessions that overlap with the search interval. Thus, if a session ends before earliestSessionEndTime, or starts after latestSessionStartTime if won't be contained in the result:earliestSessionEndTime: ESET latestSessionStartTime: LSST [ESET............LSST] [not-included] [included] [included] [included] [not-included]
This iterator must be closed after use.
- Parameters:
key
- the key to return sessions forearliestSessionEndTime
- the end timestamp of the earliest session to search for, where iteration ends.latestSessionStartTime
- the end timestamp of the latest session to search for, where iteration starts.- Returns:
- backward iterator of sessions with the matching key and aggregated values, from latest to earliest session time.
- Throws:
NullPointerException
- If null is used for key.
-
findSessions
default 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 iterating from earliest to latest. I.e., earliestSessionEndTime is the lower bound of the search interval and latestSessionStartTime is the upper bound of the search interval, and the method returns all sessions that overlap with the search interval. Thus, if a session ends before earliestSessionEndTime, or starts after latestSessionStartTime if won't be contained in the result:earliestSessionEndTime: ESET latestSessionStartTime: LSST [ESET............LSST] [not-included] [included] [included] [included] [not-included]
This iterator must be closed after use.
- Parameters:
keyFrom
- The first key that could be in the range A null value indicates a starting position from the first element in the store.keyTo
- The last key that could be in the range A null value indicates that the range ends with the last element in the store.earliestSessionEndTime
- the end timestamp of the earliest session to search for, where iteration starts.latestSessionStartTime
- the end timestamp of the latest session to search for, where iteration ends.- Returns:
- iterator of sessions with the matching keys and aggregated values, from earliest to latest session time.
-
findSessions
default KeyValueIterator<Windowed<K>,AGG> findSessions(K keyFrom, K keyTo, Instant earliestSessionEndTime, Instant latestSessionStartTime) Fetch any sessions in the given range of keys and the sessions end is ≥ earliestSessionEndTime and the sessions start is ≤ latestSessionStartTime iterating from earliest to latest. I.e., earliestSessionEndTime is the lower bound of the search interval and latestSessionStartTime is the upper bound of the search interval, and the method returns all sessions that overlap with the search interval. Thus, if a session ends before earliestSessionEndTime, or starts after latestSessionStartTime if won't be contained in the result:earliestSessionEndTime: ESET latestSessionStartTime: LSST [ESET............LSST] [not-included] [included] [included] [included] [not-included]
This iterator must be closed after use.
- Parameters:
keyFrom
- The first key that could be in the range A null value indicates a starting position from the first element in the store.keyTo
- The last key that could be in the range A null value indicates that the range ends with the last element in the store.earliestSessionEndTime
- the end timestamp of the earliest session to search for, where iteration starts.latestSessionStartTime
- the end timestamp of the latest session to search for, where iteration ends.- Returns:
- iterator of sessions with the matching keys and aggregated values, from earliest to latest session time.
-
backwardFindSessions
default KeyValueIterator<Windowed<K>,AGG> backwardFindSessions(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 iterating from latest to earliest. I.e., earliestSessionEndTime is the lower bound of the search interval and latestSessionStartTime is the upper bound of the search interval, and the method returns all sessions that overlap with the search interval. Thus, if a session ends before earliestSessionEndTime, or starts after latestSessionStartTime if won't be contained in the result:earliestSessionEndTime: ESET latestSessionStartTime: LSST [ESET............LSST] [not-included] [included] [included] [included] [not-included]
This iterator must be closed after use.
- Parameters:
keyFrom
- The first key that could be in the range A null value indicates a starting position from the first element in the store.keyTo
- The last key that could be in the range A null value indicates that the range ends with the last element in the store.earliestSessionEndTime
- the end timestamp of the earliest session to search for, where iteration ends.latestSessionStartTime
- the end timestamp of the latest session to search for, where iteration starts.- Returns:
- backward iterator of sessions with the matching keys and aggregated values, from latest to earliest session time.
-
backwardFindSessions
default KeyValueIterator<Windowed<K>,AGG> backwardFindSessions(K keyFrom, K keyTo, Instant earliestSessionEndTime, Instant latestSessionStartTime) Fetch any sessions in the given range of keys and the sessions end is ≥ earliestSessionEndTime and the sessions start is ≤ latestSessionStartTime iterating from latest to earliest. I.e., earliestSessionEndTime is the lower bound of the search interval and latestSessionStartTime is the upper bound of the search interval, and the method returns all sessions that overlap with the search interval. Thus, if a session ends before earliestSessionEndTime, or starts after latestSessionStartTime if won't be contained in the result:earliestSessionEndTime: ESET latestSessionStartTime: LSST [ESET............LSST] [not-included] [included] [included] [included] [not-included]
This iterator must be closed after use.
- Parameters:
keyFrom
- The first key that could be in the range A null value indicates a starting position from the first element in the store.keyTo
- The last key that could be in the range A null value indicates that the range ends with the last element in the store.earliestSessionEndTime
- the end timestamp of the earliest session to search for, where iteration ends.latestSessionStartTime
- the end timestamp of the latest session to search for, where iteration starts.- Returns:
- backward iterator of sessions with the matching keys and aggregated values, from latest to earliest session time.
-
fetchSession
Get the value of key from a single session.- Parameters:
key
- the key to fetchsessionStartTime
- start timestamp of the sessionsessionEndTime
- end timestamp of the session- Returns:
- The value or
null
if no session with the exact start and end timestamp exists for the given key - Throws:
NullPointerException
- Ifnull
is used for any key.
-
fetchSession
Get the value of key from a single session.- Parameters:
key
- the key to fetchsessionStartTime
- start timestamp of the sessionsessionEndTime
- end timestamp of the session- Returns:
- The value or
null
if no session with the exact start and end timestamp exists for the given key - Throws:
NullPointerException
- Ifnull
is used for any key.
-
fetch
Retrieve all aggregated sessions for the provided key. This iterator must be closed after use.For each key, the iterator guarantees ordering of sessions, starting from the oldest/earliest available session to the newest/latest session.
- Parameters:
key
- record key to find aggregated session values for- Returns:
- KeyValueIterator containing all sessions for the provided key, from oldest to newest session.
- Throws:
NullPointerException
- If null is used for key.
-
backwardFetch
Retrieve all aggregated sessions for the provided key. This iterator must be closed after use.For each key, the iterator guarantees ordering of sessions, starting from the newest/latest available session to the oldest/earliest session.
- Parameters:
key
- record key to find aggregated session values for- Returns:
- backward KeyValueIterator containing all sessions for the provided key, from newest to oldest session.
- Throws:
NullPointerException
- If null is used for key.
-
fetch
Retrieve all aggregated sessions for the given range of keys. This iterator must be closed after use.For each key, the iterator guarantees ordering of sessions, starting from the oldest/earliest available session to the newest/latest session.
- Parameters:
keyFrom
- first key in the range to find aggregated session values for A null value indicates a starting position from the first element in the store.keyTo
- last key in the range to find aggregated session values for A null value indicates that the range ends with the last element in the store.- Returns:
- KeyValueIterator containing all sessions for the provided key, from oldest to newest session.
-
backwardFetch
Retrieve all aggregated sessions for the given range of keys. This iterator must be closed after use.For each key, the iterator guarantees ordering of sessions, starting from the newest/latest available session to the oldest/earliest session.
- Parameters:
keyFrom
- first key in the range to find aggregated session values for A null value indicates a starting position from the first element in the store.keyTo
- last key in the range to find aggregated session values for A null value indicates that the range ends with the last element in the store.- Returns:
- backward KeyValueIterator containing all sessions for the provided key, from newest to oldest session.
-