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

  • Creating JSON documents from java classes using gson
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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