Codota Logo
UserSessionPredicate.expired
Code IndexAdd Codota to your IDE (free)

How to use
expired
method
in
org.keycloak.models.sessions.infinispan.stream.UserSessionPredicate

Best Java code snippets using org.keycloak.models.sessions.infinispan.stream.UserSessionPredicate.expired (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.keycloak/keycloak-model-infinispan

public UserSessionPredicate expired(Integer expired, Integer expiredRefresh) {
  return this.expired(expired, expiredRefresh, null, null);
}
origin: org.keycloak/keycloak-model-sessions-infinispan

private void removeExpiredOfflineUserSessions(RealmModel realm) {
  UserSessionPersisterProvider persister = session.getProvider(UserSessionPersisterProvider.class);
  int expiredOffline = Time.currentTime() - realm.getOfflineSessionIdleTimeout();
  Iterator<Map.Entry<String, SessionEntity>> itr = offlineSessionCache.entrySet().stream().filter(UserSessionPredicate.create(realm.getId()).expired(null, expiredOffline)).iterator();
  while (itr.hasNext()) {
    UserSessionEntity entity = (UserSessionEntity) itr.next().getValue();
    tx.remove(offlineSessionCache, entity.getId());
    persister.removeUserSession(entity.getId(), true);
    for (String clientSessionId : entity.getClientSessions()) {
      tx.remove(offlineSessionCache, clientSessionId);
    }
  }
}
origin: org.keycloak/keycloak-model-sessions-infinispan

private void removeExpiredUserSessions(RealmModel realm) {
  int expired = Time.currentTime() - realm.getSsoSessionMaxLifespan();
  int expiredRefresh = Time.currentTime() - realm.getSsoSessionIdleTimeout();
  Iterator<Map.Entry<String, SessionEntity>> itr = sessionCache.entrySet().stream().filter(UserSessionPredicate.create(realm.getId()).expired(expired, expiredRefresh)).iterator();
  while (itr.hasNext()) {
    UserSessionEntity entity = (UserSessionEntity) itr.next().getValue();
    tx.remove(sessionCache, entity.getId());
    if (entity.getClientSessions() != null) {
      for (String clientSessionId : entity.getClientSessions()) {
        tx.remove(sessionCache, clientSessionId);
      }
    }
  }
}
origin: org.keycloak/keycloak-model-infinispan

public UserSessionPredicate readObjectVersion1(ObjectInput input) throws IOException, ClassNotFoundException {
  UserSessionPredicate res = new UserSessionPredicate(MarshallUtil.unmarshallString(input));
  res.user(MarshallUtil.unmarshallString(input));
  res.client(MarshallUtil.unmarshallString(input));
  res.expired(KeycloakMarshallUtil.unmarshallInteger(input), KeycloakMarshallUtil.unmarshallInteger(input));
  res.brokerSessionId(MarshallUtil.unmarshallString(input));
  res.brokerUserId(MarshallUtil.unmarshallString(input));
  return res;
}
origin: org.keycloak/keycloak-model-infinispan

  public UserSessionPredicate readObjectVersion2(ObjectInput input) throws IOException, ClassNotFoundException {
    UserSessionPredicate res = new UserSessionPredicate(MarshallUtil.unmarshallString(input));
    res.user(MarshallUtil.unmarshallString(input));
    res.client(MarshallUtil.unmarshallString(input));
    res.expired(KeycloakMarshallUtil.unmarshallInteger(input), KeycloakMarshallUtil.unmarshallInteger(input),
        KeycloakMarshallUtil.unmarshallInteger(input), KeycloakMarshallUtil.unmarshallInteger(input));
    res.brokerSessionId(MarshallUtil.unmarshallString(input));
    res.brokerUserId(MarshallUtil.unmarshallString(input));
    return res;
  }
}
origin: org.keycloak/keycloak-model-infinispan

UserSessionPredicate predicate = UserSessionPredicate.create(realm.getId()).expired(null, expiredOffline);
origin: org.keycloak/keycloak-model-infinispan

.entrySet()
.stream()
.filter(UserSessionPredicate.create(realm.getId()).expired(expired, expiredRefresh, expiredRememberMe, expiredRefreshRememberMe))
.map(Mappers.userSessionEntity())
.forEach(new Consumer<UserSessionEntity>() {
org.keycloak.models.sessions.infinispan.streamUserSessionPredicateexpired

Popular methods of UserSessionPredicate

  • <init>
  • brokerSessionId
  • brokerUserId
  • create
    Creates a user session predicate. If using the #client(java.lang.String) method, see its warning.
  • user
  • client
    Adds a test for client. Note that this test can return stale sessions because on detaching client se

Popular in Java

  • Running tasks concurrently on multiple threads
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • findViewById (Activity)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Menu (java.awt)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now