Class UserSessionPredicate
- java.lang.Object
- 
- org.keycloak.models.sessions.infinispan.stream.UserSessionPredicate
 
- 
- All Implemented Interfaces:
- Predicate<Map.Entry<String,SessionEntityWrapper<UserSessionEntity>>>
 
 @SerializeWith(ExternalizerImpl.class) public class UserSessionPredicate extends Object implements Predicate<Map.Entry<String,SessionEntityWrapper<UserSessionEntity>>> - Author:
- Stian Thorgersen
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classUserSessionPredicate.ExternalizerImpl
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description UserSessionPredicatebrokerSessionId(String id)UserSessionPredicatebrokerUserId(String id)UserSessionPredicateclient(String clientUUID)Adds a test for client.static UserSessionPredicatecreate(String realm)Creates a user session predicate.UserSessionPredicateexpired(Integer expired, Integer expiredRefresh)UserSessionPredicateexpired(Integer expired, Integer expiredRefresh, Integer expiredRememberMe, Integer expiredRefreshRememberMe)StringgetBrokerSessionId()StringgetBrokerUserId()StringgetUserId()Returns the user id.booleantest(Map.Entry<String,SessionEntityWrapper<UserSessionEntity>> entry)UserSessionPredicateuser(String user)
 
- 
- 
- 
Method Detail- 
createpublic static UserSessionPredicate create(String realm) Creates a user session predicate. If using theclient(java.lang.String)method, see its warning.- Parameters:
- realm-
- Returns:
 
 - 
userpublic UserSessionPredicate user(String user) 
 - 
clientpublic UserSessionPredicate client(String clientUUID) Adds a test for client. Note that this test can return stale sessions because on detaching client session from user session, only client session is deleted and user session is not updated for performance reason.- Parameters:
- clientUUID-
- Returns:
- See Also:
- AuthenticatedClientSessionAdapter.detachFromUserSession()
 
 - 
expiredpublic UserSessionPredicate expired(Integer expired, Integer expiredRefresh) 
 - 
expiredpublic UserSessionPredicate expired(Integer expired, Integer expiredRefresh, Integer expiredRememberMe, Integer expiredRefreshRememberMe) 
 - 
brokerSessionIdpublic UserSessionPredicate brokerSessionId(String id) 
 - 
brokerUserIdpublic UserSessionPredicate brokerUserId(String id) 
 - 
getUserIdpublic String getUserId() Returns the user id.- Returns:
 
 - 
getBrokerSessionIdpublic String getBrokerSessionId() 
 - 
getBrokerUserIdpublic String getBrokerUserId() 
 - 
testpublic boolean test(Map.Entry<String,SessionEntityWrapper<UserSessionEntity>> entry) - Specified by:
- testin interface- Predicate<Map.Entry<String,SessionEntityWrapper<UserSessionEntity>>>
 
 
- 
 
-