Tabnine Logo
SessionLoader
Code IndexAdd Tabnine to your IDE (free)

How to use
SessionLoader
in
org.keycloak.models.sessions.infinispan.initializer

Best Java code snippets using org.keycloak.models.sessions.infinispan.initializer.SessionLoader (Showing top 12 results out of 315)

origin: org.keycloak/keycloak-model-sessions-infinispan

@Override
public void run(KeycloakSession session) {
  sessionLoader.init(session);
}
origin: org.keycloak/keycloak-model-sessions-infinispan

@Override
public void run(KeycloakSession session) {
  int count = sessionLoader.getSessionsCount(session);
  for (int i=0 ; i<count ; i+=sessionsPerSegment) {
    sessionLoader.loadSessions(session, i, sessionsPerSegment);
  }
}
origin: org.keycloak/keycloak-model-infinispan

@Override
public void run(KeycloakSession session) {
  ctx[0] = sessionLoader.computeLoaderContext(session);
}
origin: org.keycloak/keycloak-model-sessions-infinispan

@Override
public void run(KeycloakSession session) {
  sessionLoader.loadSessions(session, first, max);
}
origin: org.keycloak/keycloak-model-infinispan

    SessionLoader.WorkerContext workerCtx = sessionLoader.computeWorkerContext(loaderCtx, segment, workerId, previousResults);
this.sessionLoader.afterAllSessionsLoaded(this);
origin: org.keycloak/keycloak-model-sessions-infinispan

@Override
public void run(KeycloakSession session) {
  count[0] = sessionLoader.getSessionsCount(session);
}
origin: org.keycloak/keycloak-model-infinispan

@Override
protected boolean isFinished() {
  // Check if we should skipLoadingSessions. This can happen if someone else already did the task (For example in cross-dc environment, it was done by different DC)
  boolean isFinishedAlready = this.sessionLoader.isFinished(this);
  if (isFinishedAlready) {
    return true;
  }
  InitializerState state = getStateFromCache();
  return state != null && state.isFinished();
}
origin: org.keycloak/keycloak-model-infinispan

@Override
public SessionLoader.WorkerResult call() throws Exception {
  if (log.isTraceEnabled()) {
    log.tracef("Running computation for segment: %s", workerCtx.toString());
  }
  KeycloakSessionFactory sessionFactory = workCache.getAdvancedCache().getComponentRegistry().getComponent(KeycloakSessionFactory.class);
  if (sessionFactory == null) {
    log.debugf("KeycloakSessionFactory not yet set in cache. Worker skipped");
    return sessionLoader.createFailedWorkerResult(loaderCtx, workerCtx);
  }
  SessionLoader.WorkerResult[] ref = new SessionLoader.WorkerResult[1];
  KeycloakModelUtils.runJobInTransaction(sessionFactory, new KeycloakSessionTask() {
    @Override
    public void run(KeycloakSession session) {
      ref[0] = sessionLoader.loadSessions(session, loaderCtx, workerCtx);
    }
  });
  return ref[0];
}
origin: org.keycloak/keycloak-model-infinispan

@Override
public void run(KeycloakSession session) {
  ref[0] = sessionLoader.loadSessions(session, loaderCtx, workerCtx);
}
origin: org.keycloak/keycloak-model-infinispan

@Override
public void run(KeycloakSession session) {
  sessionLoader.init(session);
}
origin: org.keycloak/keycloak-model-infinispan

@Override
public void run(KeycloakSession session) {
  ctx[0] = sessionLoader.computeLoaderContext(session);
}
origin: org.keycloak/keycloak-model-sessions-infinispan

@Override
public void run(KeycloakSession session) {
  sessionLoader.init(session);
}
org.keycloak.models.sessions.infinispan.initializerSessionLoader

Most used methods

  • init
    Will be triggered just once on cluster coordinator node to perform some generic initialization tasks
  • loadSessions
    Will be called on all cluster nodes to load the specified page.
  • afterAllSessionsLoaded
    Callback triggered on cluster coordinator once it recognize that all sessions were successfully load
  • computeLoaderContext
    Will be triggered just once on cluster coordinator node to count the number of segments and other co
  • computeWorkerContext
    Compute the worker context for current iteration
  • createFailedWorkerResult
    Called when it's not possible to compute current iteration and load session for some reason (EG. inf
  • getSessionsCount
  • isFinished
    This will be called on nodes to check if loading is finished. It allows loader to notify that loadin

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • requestLocationUpdates (LocationManager)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now