Class RemoteInfinispanAuthenticationSessionProviderFactory
java.lang.Object
org.keycloak.models.sessions.infinispan.remote.RemoteInfinispanAuthenticationSessionProviderFactory
- All Implemented Interfaces:
UpdaterFactory<String,
,RootAuthenticationSessionEntity, RootAuthenticationSessionUpdater> RemoteChangeLogTransaction.SharedState<String,
,RootAuthenticationSessionEntity> EnvironmentDependentProviderFactory
,ProviderFactory<RemoteInfinispanAuthenticationSessionProvider>
,ServerInfoAwareProviderFactory
,AuthenticationSessionProviderFactory<RemoteInfinispanAuthenticationSessionProvider>
public class RemoteInfinispanAuthenticationSessionProviderFactory
extends Object
implements AuthenticationSessionProviderFactory<RemoteInfinispanAuthenticationSessionProvider>, UpdaterFactory<String,RootAuthenticationSessionEntity,RootAuthenticationSessionUpdater>, EnvironmentDependentProviderFactory, RemoteChangeLogTransaction.SharedState<String,RootAuthenticationSessionEntity>, ServerInfoAwareProviderFactory
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
org.infinispan.util.concurrent.BlockingManager
org.infinispan.client.hotrod.RemoteCache<String,
RootAuthenticationSessionEntity> cache()
void
close()
This is called when the server shuts down.create
(String key, RootAuthenticationSessionEntity entity) Creates anUpdater
for an entity created by the current Keycloak transaction.create
(KeycloakSession session) Deletes a entity that was not previous read by the Keycloak transaction.Returns the metadata for each configuration property supported by this factory.getId()
Return actual info about the provider.void
init
(Config.Scope config) Only called once when the factory is first created.boolean
isSupported
(Config.Scope config) Check if the provider is supported and should be available based on the provider configuration.int
int
order()
void
postInit
(KeycloakSessionFactory factory) Called after all provider factories have been initializedwrapFromCache
(String key, RootAuthenticationSessionEntity value, long version) Wraps an entity read from the Infinispan cache.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.keycloak.provider.ProviderFactory
dependsOn
Methods inherited from interface org.keycloak.models.sessions.infinispan.changes.remote.updater.UpdaterFactory
wrapFromCache
-
Field Details
-
PROTO_ENTITY
-
-
Constructor Details
-
RemoteInfinispanAuthenticationSessionProviderFactory
public RemoteInfinispanAuthenticationSessionProviderFactory()
-
-
Method Details
-
isSupported
Description copied from interface:EnvironmentDependentProviderFactory
Check if the provider is supported and should be available based on the provider configuration.- Specified by:
isSupported
in interfaceEnvironmentDependentProviderFactory
- Parameters:
config
- the provider configuration- Returns:
true
if the provider is supported. Otherwise,false
.
-
create
- Specified by:
create
in interfaceProviderFactory<RemoteInfinispanAuthenticationSessionProvider>
-
init
Description copied from interface:ProviderFactory
Only called once when the factory is first created. This config is pulled from keycloak_server.json- Specified by:
init
in interfaceProviderFactory<RemoteInfinispanAuthenticationSessionProvider>
-
postInit
Description copied from interface:ProviderFactory
Called after all provider factories have been initialized- Specified by:
postInit
in interfaceProviderFactory<RemoteInfinispanAuthenticationSessionProvider>
-
close
public void close()Description copied from interface:ProviderFactory
This is called when the server shuts down.- Specified by:
close
in interfaceProviderFactory<RemoteInfinispanAuthenticationSessionProvider>
-
getConfigMetadata
Description copied from interface:ProviderFactory
Returns the metadata for each configuration property supported by this factory.- Specified by:
getConfigMetadata
in interfaceProviderFactory<RemoteInfinispanAuthenticationSessionProvider>
- Returns:
- a list with the metadata for each configuration property supported by this factory
-
getOperationalInfo
Description copied from interface:ServerInfoAwareProviderFactory
Return actual info about the provider. This info contains information about provider's configuration and operational conditions (eg. errors in connection to remote systems etc) which is shown on "Server Info" page then.- Specified by:
getOperationalInfo
in interfaceServerInfoAwareProviderFactory
- Returns:
- Map with keys describing value and relevant values itself
-
create
Description copied from interface:UpdaterFactory
Creates anUpdater
for an entity created by the current Keycloak transaction.- Specified by:
create
in interfaceUpdaterFactory<String,
RootAuthenticationSessionEntity, RootAuthenticationSessionUpdater> - Parameters:
key
- The Infinispan key.entity
- The Infinispan value.- Returns:
- The
Updater
to be used when updating the entity state.
-
wrapFromCache
public RootAuthenticationSessionUpdater wrapFromCache(String key, RootAuthenticationSessionEntity value, long version) Description copied from interface:UpdaterFactory
Wraps an entity read from the Infinispan cache.- Specified by:
wrapFromCache
in interfaceUpdaterFactory<String,
RootAuthenticationSessionEntity, RootAuthenticationSessionUpdater> - Parameters:
key
- The Infinispan key.value
- The Infinispan value.version
- The entry version.- Returns:
- The
Updater
to be used when updating the entity state.
-
deleted
Description copied from interface:UpdaterFactory
Deletes a entity that was not previous read by the Keycloak transaction.- Specified by:
deleted
in interfaceUpdaterFactory<String,
RootAuthenticationSessionEntity, RootAuthenticationSessionUpdater> - Parameters:
key
- The Infinispan key.- Returns:
- The
Updater
for a deleted entity.
-
cache
- Specified by:
cache
in interfaceRemoteChangeLogTransaction.SharedState<String,
RootAuthenticationSessionEntity>
-
getId
- Specified by:
getId
in interfaceProviderFactory<RemoteInfinispanAuthenticationSessionProvider>
-
order
public int order()- Specified by:
order
in interfaceProviderFactory<RemoteInfinispanAuthenticationSessionProvider>
-
maxRetries
public int maxRetries()- Specified by:
maxRetries
in interfaceRemoteChangeLogTransaction.SharedState<String,
RootAuthenticationSessionEntity>
-
backOffBaseTimeMillis
public int backOffBaseTimeMillis()- Specified by:
backOffBaseTimeMillis
in interfaceRemoteChangeLogTransaction.SharedState<String,
RootAuthenticationSessionEntity>
-
blockingManager
public org.infinispan.util.concurrent.BlockingManager blockingManager()- Specified by:
blockingManager
in interfaceRemoteChangeLogTransaction.SharedState<String,
RootAuthenticationSessionEntity>
-