gluu
公開メンバ関数 | 非公開メンバ関数 | 非公開変数類 | 静的非公開変数類 | 全メンバ一覧
org.gluu.oxtrust.service.status.ldap.LdapStatusTimer クラス
org.gluu.oxtrust.service.status.ldap.LdapStatusTimer 連携図
Collaboration graph

公開メンバ関数

void initTimer ()
 
void process (@Observes @Scheduled LdapStatusEvent ldapStatusEvent)
 
void logConnectionProviderStatistic (PersistenceEntryManager ldapEntryManager, String connectionProviderName)
 

非公開メンバ関数

void processInt ()
 

非公開変数類

Logger log
 
CentralLdapService centralLdapService
 
Event< TimerEvent > timerEvent
 
PersistenceEntryManager ldapEntryManager
 
PersistenceEntryManager ldapCentralEntryManager
 
AtomicBoolean isActive
 

静的非公開変数類

static final int DEFAULT_INTERVAL = 60
 

詳解

著者
Yuriy Movchan
バージョン
0.1, 11/18/2012

関数詳解

◆ initTimer()

void org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.initTimer ( )
inline
57  {
58  log.info("Initializing Ldap Status Timer");
59  this.isActive = new AtomicBoolean(false);
60 
61  timerEvent.fire(new TimerEvent(new TimerSchedule(DEFAULT_INTERVAL, DEFAULT_INTERVAL), new LdapStatusEvent(),
62  Scheduled.Literal.INSTANCE));
63  }
static final int DEFAULT_INTERVAL
Definition: LdapStatusTimer.java:38
Logger log
Definition: LdapStatusTimer.java:41
Event< TimerEvent > timerEvent
Definition: LdapStatusTimer.java:47
AtomicBoolean isActive
Definition: LdapStatusTimer.java:55

◆ logConnectionProviderStatistic()

void org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.logConnectionProviderStatistic ( PersistenceEntryManager  ldapEntryManager,
String  connectionProviderName 
)
inline
90  {
91  PersistenceOperationService persistenceOperationService = ldapEntryManager.getOperationService();
92  if (!(persistenceOperationService instanceof LdapEntryManager)) {
93  return;
94  }
95 
96  LdapConnectionProvider ldapConnectionProvider = (LdapConnectionProvider) persistenceOperationService;
97 
98  if (ldapConnectionProvider == null) {
99  log.error("{} is empty", connectionProviderName);
100  } else {
101  if (ldapConnectionProvider.getConnectionPool() == null) {
102  log.error("{} is empty", connectionProviderName);
103  } else {
104  log.debug("{} statistics: {}", connectionProviderName, ldapConnectionProvider.getConnectionPool().getConnectionPoolStatistics());
105  }
106  }
107  }
Logger log
Definition: LdapStatusTimer.java:41
PersistenceEntryManager ldapEntryManager
Definition: LdapStatusTimer.java:50

◆ process()

void org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.process ( @Observes @Scheduled LdapStatusEvent  ldapStatusEvent)
inline
66  {
67  if (this.isActive.get()) {
68  return;
69  }
70 
71  if (!this.isActive.compareAndSet(false, true)) {
72  return;
73  }
74 
75  try {
76  processInt();
77  } finally {
78  this.isActive.set(false);
79  }
80  }
void processInt()
Definition: LdapStatusTimer.java:82
AtomicBoolean isActive
Definition: LdapStatusTimer.java:55

◆ processInt()

void org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.processInt ( )
inlineprivate
82  {
83  logConnectionProviderStatistic(ldapEntryManager, "connectionProvider");
84 
85  if (centralLdapService.isUseCentralServer() && (ldapCentralEntryManager.getOperationService() != null)) {
86  logConnectionProviderStatistic(ldapCentralEntryManager, "centralConnectionProvider");
87  }
88  }
void logConnectionProviderStatistic(PersistenceEntryManager ldapEntryManager, String connectionProviderName)
Definition: LdapStatusTimer.java:90
boolean isUseCentralServer()
Definition: CentralLdapService.java:62
CentralLdapService centralLdapService
Definition: LdapStatusTimer.java:44
PersistenceEntryManager ldapCentralEntryManager
Definition: LdapStatusTimer.java:53
PersistenceEntryManager ldapEntryManager
Definition: LdapStatusTimer.java:50

メンバ詳解

◆ centralLdapService

CentralLdapService org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.centralLdapService
private

◆ DEFAULT_INTERVAL

final int org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.DEFAULT_INTERVAL = 60
staticprivate

◆ isActive

AtomicBoolean org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.isActive
private

◆ ldapCentralEntryManager

PersistenceEntryManager org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.ldapCentralEntryManager
private

◆ ldapEntryManager

PersistenceEntryManager org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.ldapEntryManager
private

◆ log

Logger org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.log
private

◆ timerEvent

Event<TimerEvent> org.gluu.oxtrust.service.status.ldap.LdapStatusTimer.timerEvent
private

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