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

How to use
CachedClient
in
org.keycloak.models.cache.entities

Best Java code snippets using org.keycloak.models.cache.entities.CachedClient (Showing top 15 results out of 315)

origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public String getAttribute(String name) {
  if (updated != null) return updated.getAttribute(name);
  return cached.getAttributes().get(name);
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public String getBaseUrl() {
  if (updated != null) return updated.getBaseUrl();
  return cached.getBaseUrl();
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public String getClientAuthenticatorType() {
  if (updated != null) return updated.getClientAuthenticatorType();
  return cached.getClientAuthenticatorType();
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public ClientModel getClientById(String id, RealmModel realm) {
  if (!cache.isEnabled()) return getDelegate().getClientById(id, realm);
  CachedClient cached = cache.getApplication(id);
  if (cached != null && !cached.getRealm().equals(realm.getId())) {
    cached = null;
  }
  if (cached == null) {
    ClientModel model = getDelegate().getClientById(id, realm);
    if (model == null) return null;
    if (appInvalidations.contains(id)) return model;
    cached = new CachedClient(cache, getDelegate(), realm, model);
    cache.addCachedClient(cached);
  } else if (appInvalidations.contains(id)) {
    return getDelegate().getClientById(id, realm);
  } else if (managedApplications.containsKey(id)) {
    return managedApplications.get(id);
  }
  ClientAdapter adapter = new ClientAdapter(realm, cached, this, cache);
  managedApplications.put(id, adapter);
  return adapter;
}
@Override
origin: org.keycloak/keycloak-invalidation-cache-infinispan

  private void remove(Object object) {
    if (object instanceof CachedRealm) {
      CachedRealm realm = (CachedRealm) object;
      realmLookup.remove(realm.getName());
      for (String r : realm.getRealmRoles().values()) {
        realmCache.evictCachedRoleById(r);
      }
      for (String c : realm.getClients().values()) {
        realmCache.evictCachedApplicationById(c);
      }
      log.tracev("Realm removed realm={0}", realm.getName());
    } else if (object instanceof CachedClient) {
      CachedClient client = (CachedClient) object;
      for (String r : client.getRoles().values()) {
        realmCache.evictCachedRoleById(r);
      }
      log.tracev("Client removed client={0}", client.getId());
    }
  }
}
origin: org.keycloak/keycloak-invalidation-cache-model

CachedClient cachedClient = new CachedClient(cache, delegate, model, client);
cache.addCachedClient(cachedClient);
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public void invalidateApplication(CachedClient app) {
  logger.tracev("Removing application {0}", app.getId());
  cache.remove(app.getId());
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public ClientTemplateModel getClientTemplate() {
  if (updated != null) return updated.getClientTemplate();
  if (cached.getClientTemplate() == null) return null;
  return cacheSession.getClientTemplateById(cached.getClientTemplate(), cachedRealm);
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public String getClientId() {
  if (updated != null) return updated.getClientId();
  return cached.getClientId();
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public String getDescription() {
  if (updated != null) return updated.getDescription();
  return cached.getDescription();
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public String getManagementUrl() {
  if (updated != null) return updated.getManagementUrl();
  return cached.getManagementUrl();
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public List<String> getDefaultRoles() {
  if (updated != null) return updated.getDefaultRoles();
  return cached.getDefaultRoles();
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public void addCachedClient(CachedClient app) {
  if (!enabled) return;
  logger.tracev("Adding application {0}", app.getId());
  cache.putForExternalRead(app.getId(), app);
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public String getId() {
  if (updated != null) return updated.getId();
  return cached.getId();
}
origin: org.keycloak/keycloak-invalidation-cache-infinispan

@Override
public Map<String, String> getAttributes() {
  if (updated != null) return updated.getAttributes();
  Map<String, String> copy = new HashMap<String, String>();
  copy.putAll(cached.getAttributes());
  return copy;
}
org.keycloak.models.cache.entitiesCachedClient

Most used methods

  • <init>
  • getAttributes
  • getBaseUrl
  • getClientAuthenticatorType
  • getClientId
  • getClientTemplate
  • getDefaultRoles
  • getDescription
  • getId
  • getManagementUrl
  • getName
  • getNodeReRegistrationTimeout
  • getName,
  • getNodeReRegistrationTimeout,
  • getNotBefore,
  • getProtocol,
  • getProtocolMappers,
  • getRealm,
  • getRedirectUris,
  • getRegisteredNodes,
  • getRegistrationToken,
  • getRoles

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • getSharedPreferences (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top 17 Plugins for Android Studio
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