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

公開メンバ関数

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

非公開メンバ関数

void processInt ()
 

非公開変数類

Logger log
 
Event< TimerEvent > timerEvent
 
PersistenceEntryManager ldapEntryManager
 
List< PersistenceEntryManager > ldapAuthEntryManagers
 
AtomicBoolean isActive
 

静的非公開変数類

static final int DEFAULT_INTERVAL = 60
 

詳解

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

関数詳解

◆ initTimer()

void org.xdi.oxauth.service.status.ldap.LdapStatusTimer.initTimer ( )
inline
56  {
57  log.info("Initializing Ldap Status Timer");
58  this.isActive = new AtomicBoolean(false);
59 
60  timerEvent.fire(new TimerEvent(new TimerSchedule(DEFAULT_INTERVAL, DEFAULT_INTERVAL), new LdapStatusEvent(),
61  Scheduled.Literal.INSTANCE));
62  }
static final int DEFAULT_INTERVAL
Definition: LdapStatusTimer.java:40
Logger log
Definition: LdapStatusTimer.java:43
AtomicBoolean isActive
Definition: LdapStatusTimer.java:54
Event< TimerEvent > timerEvent
Definition: LdapStatusTimer.java:46

◆ logConnectionProviderStatistic()

void org.xdi.oxauth.service.status.ldap.LdapStatusTimer.logConnectionProviderStatistic ( PersistenceEntryManager  ldapEntryManager,
String  connectionProviderName,
String  bindConnectionProviderName 
)
inline
90  {
91  PersistenceOperationService persistenceOperationService = ldapEntryManager.getOperationService();
92  if (!(persistenceOperationService instanceof LdapOperationService)) {
93  return;
94  }
95 
96  LdapConnectionProvider ldapConnectionProvider = ((LdapOperationService) persistenceOperationService).getConnectionProvider();
97  LdapConnectionProvider bindLdapConnectionProvider = ((LdapOperationService) persistenceOperationService).getBindConnectionProvider();
98 
99  if (ldapConnectionProvider == null) {
100  log.error("{} is empty", connectionProviderName);
101  } else {
102  if (ldapConnectionProvider.getConnectionPool() == null) {
103  log.error("{} is empty", connectionProviderName);
104  } else {
105  log.debug("{} statistics: {}", connectionProviderName, ldapConnectionProvider.getConnectionPool().getConnectionPoolStatistics());
106  }
107  }
108 
109  if (bindLdapConnectionProvider == null) {
110  log.error("{} is empty", bindConnectionProviderName);
111  } else {
112  if (bindLdapConnectionProvider.getConnectionPool() == null) {
113  log.error("{} is empty", bindConnectionProviderName);
114  } else {
115  log.debug("{} statistics: {}", bindConnectionProviderName, bindLdapConnectionProvider.getConnectionPool().getConnectionPoolStatistics());
116  }
117  }
118  }
Logger log
Definition: LdapStatusTimer.java:43
PersistenceEntryManager ldapEntryManager
Definition: LdapStatusTimer.java:49

◆ process()

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

◆ processInt()

void org.xdi.oxauth.service.status.ldap.LdapStatusTimer.processInt ( )
inlineprivate
81  {
82  logConnectionProviderStatistic(ldapEntryManager, "connectionProvider", "bindConnectionProvider");
83 
84  for (int i = 0; i < ldapAuthEntryManagers.size(); i++) {
85  PersistenceEntryManager ldapAuthEntryManager = ldapAuthEntryManagers.get(i);
86  logConnectionProviderStatistic(ldapAuthEntryManager, "authConnectionProvider#" + i, "bindAuthConnectionProvider#" + i);
87  }
88  }
List< PersistenceEntryManager > ldapAuthEntryManagers
Definition: LdapStatusTimer.java:52
void logConnectionProviderStatistic(PersistenceEntryManager ldapEntryManager, String connectionProviderName, String bindConnectionProviderName)
Definition: LdapStatusTimer.java:90
PersistenceEntryManager ldapEntryManager
Definition: LdapStatusTimer.java:49

メンバ詳解

◆ DEFAULT_INTERVAL

final int org.xdi.oxauth.service.status.ldap.LdapStatusTimer.DEFAULT_INTERVAL = 60
staticprivate

◆ isActive

AtomicBoolean org.xdi.oxauth.service.status.ldap.LdapStatusTimer.isActive
private

◆ ldapAuthEntryManagers

List<PersistenceEntryManager> org.xdi.oxauth.service.status.ldap.LdapStatusTimer.ldapAuthEntryManagers
private

◆ ldapEntryManager

PersistenceEntryManager org.xdi.oxauth.service.status.ldap.LdapStatusTimer.ldapEntryManager
private

◆ log

Logger org.xdi.oxauth.service.status.ldap.LdapStatusTimer.log
private

◆ timerEvent

Event<TimerEvent> org.xdi.oxauth.service.status.ldap.LdapStatusTimer.timerEvent
private

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