Record Class RemoteInfinispanConnectionProvider
java.lang.Object
java.lang.Record
org.keycloak.connections.infinispan.remote.RemoteInfinispanConnectionProvider
- All Implemented Interfaces:
InfinispanConnectionProvider,Provider
public record RemoteInfinispanConnectionProvider(org.infinispan.manager.EmbeddedCacheManager embeddedCacheManager, org.infinispan.client.hotrod.RemoteCacheManager remoteCacheManager, TopologyInfo topologyInfo)
extends Record
implements InfinispanConnectionProvider
-
Field Summary
Fields inherited from interface org.keycloak.connections.infinispan.InfinispanConnectionProvider
ACTION_TOKEN_CACHE, ACTION_TOKEN_CACHE_DEFAULT_MAX, ACTION_TOKEN_MAX_IDLE_SECONDS, ACTION_TOKEN_WAKE_UP_INTERVAL_SECONDS, ALL_CACHES_NAME, AUTHENTICATION_SESSIONS_CACHE_NAME, AUTHORIZATION_CACHE_NAME, AUTHORIZATION_REVISIONS_CACHE_DEFAULT_MAX, AUTHORIZATION_REVISIONS_CACHE_NAME, CLIENT_SESSION_CACHE_NAME, CLUSTERED_CACHE_NAMES, CLUSTERED_CACHE_NUM_OWNERS, CLUSTERED_MAX_COUNT_CACHES, CRL_CACHE_DEFAULT_MAX, CRL_CACHE_NAME, JBOSS_NODE_NAME, JBOSS_SITE_NAME, JGROUPS_BIND_ADDR, JGROUPS_UDP_MCAST_ADDR, JMX_DOMAIN, KEYS_CACHE_DEFAULT_MAX, KEYS_CACHE_MAX_IDLE_SECONDS, KEYS_CACHE_NAME, LOCAL_CACHE_NAMES, LOCAL_MAX_COUNT_CACHES, LOGIN_FAILURE_CACHE_NAME, NODE_PREFIX, OFFLINE_CLIENT_SESSION_CACHE_NAME, OFFLINE_USER_SESSION_CACHE_NAME, REALM_CACHE_NAME, REALM_REVISIONS_CACHE_DEFAULT_MAX, REALM_REVISIONS_CACHE_NAME, SESSIONS_CACHE_DEFAULT_MAX, USER_AND_CLIENT_SESSION_CACHES, USER_CACHE_NAME, USER_REVISIONS_CACHE_DEFAULT_MAX, USER_REVISIONS_CACHE_NAME, USER_SESSION_CACHE_NAME, WORK_CACHE_NAME -
Constructor Summary
ConstructorsConstructorDescriptionRemoteInfinispanConnectionProvider(org.infinispan.manager.EmbeddedCacheManager embeddedCacheManager, org.infinispan.client.hotrod.RemoteCacheManager remoteCacheManager, TopologyInfo topologyInfo) Creates an instance of aRemoteInfinispanConnectionProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.infinispan.manager.EmbeddedCacheManagerReturns the value of theembeddedCacheManagerrecord component.final booleanIndicates whether some other object is "equal to" this one.org.infinispan.util.concurrent.BlockingManagerReturns the InfinispanBlockingManager.<K,V> org.infinispan.Cache<K, V> Provides an instance if Infinispan cache by name<K,V> org.infinispan.client.hotrod.RemoteCache<K, V> getRemoteCache(String name) Get remote cache of given name.final inthashCode()Returns a hash code value for this object.Migrates the JBoss Marshalling encoding to Infinispan ProtoStreamorg.infinispan.client.hotrod.RemoteCacheManagerReturns the value of theremoteCacheManagerrecord component.Returns the value of thetopologyInforecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.keycloak.connections.infinispan.InfinispanConnectionProvider
getCache, getExecutor
-
Constructor Details
-
RemoteInfinispanConnectionProvider
public RemoteInfinispanConnectionProvider(org.infinispan.manager.EmbeddedCacheManager embeddedCacheManager, org.infinispan.client.hotrod.RemoteCacheManager remoteCacheManager, TopologyInfo topologyInfo) Creates an instance of aRemoteInfinispanConnectionProviderrecord class.- Parameters:
embeddedCacheManager- the value for theembeddedCacheManagerrecord componentremoteCacheManager- the value for theremoteCacheManagerrecord componenttopologyInfo- the value for thetopologyInforecord component
-
-
Method Details
-
getCache
Description copied from interface:InfinispanConnectionProviderProvides an instance if Infinispan cache by name- Specified by:
getCachein interfaceInfinispanConnectionProvider- Type Parameters:
K- key typeV- value type- Parameters:
name- name of the requested cachecreateIfAbsent- if true the connection provider will create the requested cache on method call if it does not exist- Returns:
- return a cache instance
-
getRemoteCache
Description copied from interface:InfinispanConnectionProviderGet remote cache of given name. Could just retrieve the remote cache from the remoteStore configured in given infinispan cache and/or alternatively return the secured remoteCache (remoteCache corresponding to secured hotrod endpoint)- Specified by:
getRemoteCachein interfaceInfinispanConnectionProvider
-
getTopologyInfo
- Specified by:
getTopologyInfoin interfaceInfinispanConnectionProvider- Returns:
- Information about cluster topology
-
migrateToProtoStream
Description copied from interface:InfinispanConnectionProviderMigrates the JBoss Marshalling encoding to Infinispan ProtoStream- Specified by:
migrateToProtoStreamin interfaceInfinispanConnectionProvider- Returns:
- A
CompletionStageto signal when the operator is completed.
-
getScheduledExecutor
- Specified by:
getScheduledExecutorin interfaceInfinispanConnectionProvider- Returns:
- The Infinispan
ScheduledExecutorService. Long or blocking operations must not be executed directly.
-
getBlockingManager
public org.infinispan.util.concurrent.BlockingManager getBlockingManager()Description copied from interface:InfinispanConnectionProviderReturns the InfinispanBlockingManager.The
BlockingManagershould be used to execute blocking operation like disk I/O. It offloads the task to the Infinispan blocking thread pool.- Specified by:
getBlockingManagerin interfaceInfinispanConnectionProvider- Returns:
- The Infinispan
BlockingManager.
-
close
public void close() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
embeddedCacheManager
public org.infinispan.manager.EmbeddedCacheManager embeddedCacheManager()Returns the value of theembeddedCacheManagerrecord component.- Returns:
- the value of the
embeddedCacheManagerrecord component
-
remoteCacheManager
public org.infinispan.client.hotrod.RemoteCacheManager remoteCacheManager()Returns the value of theremoteCacheManagerrecord component.- Returns:
- the value of the
remoteCacheManagerrecord component
-
topologyInfo
Returns the value of thetopologyInforecord component.- Returns:
- the value of the
topologyInforecord component
-