keycloak
公開メンバ関数 | 静的公開変数類 | 限定公開メンバ関数 | 全メンバ一覧
org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory クラス
org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory 連携図
Collaboration graph

公開メンバ関数

LastSessionRefreshStore createAndInit (KeycloakSession kcSession, Cache< String, SessionEntityWrapper< UserSessionEntity >> cache, boolean offline)
 
LastSessionRefreshStore createAndInit (KeycloakSession kcSession, Cache< String, SessionEntityWrapper< UserSessionEntity >> cache, long timerIntervalMs, int maxIntervalBetweenMessagesSeconds, int maxCount, boolean offline)
 

静的公開変数類

static final long DEFAULT_TIMER_INTERVAL_MS = 5000
 
static final int DEFAULT_MAX_INTERVAL_BETWEEN_MESSAGES_SECONDS = SessionTimeoutHelper.PERIODIC_TASK_INTERVAL_SECONDS
 
static final int DEFAULT_MAX_COUNT = 100
 
static final String LSR_PERIODIC_TASK_NAME = "lastSessionRefreshes"
 
static final String LSR_OFFLINE_PERIODIC_TASK_NAME = "lastSessionRefreshes-offline"
 

限定公開メンバ関数

LastSessionRefreshStore createStoreInstance (int maxIntervalBetweenMessagesSeconds, int maxCount, String eventKey)
 

詳解

著者
Marek Posolda

関数詳解

◆ createAndInit() [1/2]

LastSessionRefreshStore org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory.createAndInit ( KeycloakSession  kcSession,
Cache< String, SessionEntityWrapper< UserSessionEntity >>  cache,
boolean  offline 
)
inline
48  {
50  }
static final int DEFAULT_MAX_COUNT
Definition: LastSessionRefreshStoreFactory.java:41
LastSessionRefreshStore createAndInit(KeycloakSession kcSession, Cache< String, SessionEntityWrapper< UserSessionEntity >> cache, boolean offline)
Definition: LastSessionRefreshStoreFactory.java:48
static final int DEFAULT_MAX_INTERVAL_BETWEEN_MESSAGES_SECONDS
Definition: LastSessionRefreshStoreFactory.java:38
static final long DEFAULT_TIMER_INTERVAL_MS
Definition: LastSessionRefreshStoreFactory.java:35

◆ createAndInit() [2/2]

LastSessionRefreshStore org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory.createAndInit ( KeycloakSession  kcSession,
Cache< String, SessionEntityWrapper< UserSessionEntity >>  cache,
long  timerIntervalMs,
int  maxIntervalBetweenMessagesSeconds,
int  maxCount,
boolean  offline 
)
inline
53  {
54  String eventKey = offline ? LSR_OFFLINE_PERIODIC_TASK_NAME : LSR_PERIODIC_TASK_NAME;
55  LastSessionRefreshStore store = createStoreInstance(maxIntervalBetweenMessagesSeconds, maxCount, eventKey);
56 
57  // Register listener
58  ClusterProvider cluster = kcSession.getProvider(ClusterProvider.class);
59  cluster.registerListener(eventKey, new LastSessionRefreshListener(kcSession, cache, offline));
60 
61  // Setup periodic timer check
62  TimerProvider timer = kcSession.getProvider(TimerProvider.class);
63  timer.scheduleTask((KeycloakSession keycloakSession) -> {
64 
65  store.checkSendingMessage(keycloakSession, Time.currentTime());
66 
67  }, timerIntervalMs, eventKey);
68 
69  return store;
70  }
LastSessionRefreshStore createStoreInstance(int maxIntervalBetweenMessagesSeconds, int maxCount, String eventKey)
Definition: LastSessionRefreshStoreFactory.java:73
static final String LSR_PERIODIC_TASK_NAME
Definition: LastSessionRefreshStoreFactory.java:44
static final String LSR_OFFLINE_PERIODIC_TASK_NAME
Definition: LastSessionRefreshStoreFactory.java:45

◆ createStoreInstance()

LastSessionRefreshStore org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory.createStoreInstance ( int  maxIntervalBetweenMessagesSeconds,
int  maxCount,
String  eventKey 
)
inlineprotected
73  {
74  return new LastSessionRefreshStore(maxIntervalBetweenMessagesSeconds, maxCount, eventKey);
75  }

メンバ詳解

◆ DEFAULT_MAX_COUNT

final int org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory.DEFAULT_MAX_COUNT = 100
static

◆ DEFAULT_MAX_INTERVAL_BETWEEN_MESSAGES_SECONDS

final int org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory.DEFAULT_MAX_INTERVAL_BETWEEN_MESSAGES_SECONDS = SessionTimeoutHelper.PERIODIC_TASK_INTERVAL_SECONDS
static

◆ DEFAULT_TIMER_INTERVAL_MS

final long org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory.DEFAULT_TIMER_INTERVAL_MS = 5000
static

◆ LSR_OFFLINE_PERIODIC_TASK_NAME

final String org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory.LSR_OFFLINE_PERIODIC_TASK_NAME = "lastSessionRefreshes-offline"
static

◆ LSR_PERIODIC_TASK_NAME

final String org.keycloak.models.sessions.infinispan.changes.sessions.LastSessionRefreshStoreFactory.LSR_PERIODIC_TASK_NAME = "lastSessionRefreshes"
static

このクラス詳解は次のファイルから抽出されました: