public interface UserSessionPersisterProvider extends Provider
Modifier and Type | Method and Description |
---|---|
void |
createClientSession(AuthenticatedClientSessionModel clientSession,
boolean offline) |
void |
createUserSession(UserSessionModel userSession,
boolean offline) |
int |
getUserSessionsCount(boolean offline) |
default List<UserSessionModel> |
loadUserSessions(int firstResult,
int maxResults,
boolean offline,
int lastCreatedOn,
String lastUserSessionId)
Deprecated.
Use
loadUserSessionsStream instead. |
Stream<UserSessionModel> |
loadUserSessionsStream(Integer firstResult,
Integer maxResults,
boolean offline,
Integer lastCreatedOn,
String lastUserSessionId)
Called during startup.
|
void |
onClientRemoved(RealmModel realm,
ClientModel client) |
void |
onRealmRemoved(RealmModel realm) |
void |
onUserRemoved(RealmModel realm,
UserModel user) |
void |
removeClientSession(String userSessionId,
String clientUUID,
boolean offline) |
void |
removeExpired(RealmModel realm) |
void |
removeUserSession(String userSessionId,
boolean offline) |
void |
updateLastSessionRefreshes(RealmModel realm,
int lastSessionRefresh,
Collection<String> userSessionIds,
boolean offline) |
void createUserSession(UserSessionModel userSession, boolean offline)
void createClientSession(AuthenticatedClientSessionModel clientSession, boolean offline)
void removeUserSession(String userSessionId, boolean offline)
void removeClientSession(String userSessionId, String clientUUID, boolean offline)
void onRealmRemoved(RealmModel realm)
void onClientRemoved(RealmModel realm, ClientModel client)
void onUserRemoved(RealmModel realm, UserModel user)
void updateLastSessionRefreshes(RealmModel realm, int lastSessionRefresh, Collection<String> userSessionIds, boolean offline)
void removeExpired(RealmModel realm)
@Deprecated default List<UserSessionModel> loadUserSessions(int firstResult, int maxResults, boolean offline, int lastCreatedOn, String lastUserSessionId)
loadUserSessionsStream
instead.Stream<UserSessionModel> loadUserSessionsStream(Integer firstResult, Integer maxResults, boolean offline, Integer lastCreatedOn, String lastUserSessionId)
firstResult
- Integer
Index of the first desired user session. Ignored if negative or null
.maxResults
- Integer
Maximum number of returned user sessions. Ignored if negative or null
.offline
- boolean
Flag to include offline sessions.lastCreatedOn
- Integer
Timestamp when the user session was created. It will return only user sessions created later.lastUserSessionId
- String
Id of the user session. In case of equal lastCreatedOn
it will compare the id in dictionary order and takes only those created later.UserSessionModel
. Never returns null
.int getUserSessionsCount(boolean offline)
Copyright © 2021 JBoss by Red Hat. All rights reserved.