| | |
| | | public void initializeMonitorProvider(ConfigEntry configEntry) |
| | | throws ConfigException |
| | | { |
| | | |
| | | // Throw an exception, because this monitor is not intended to be |
| | | // dynamically loaded from the configuration. Rather, it should be |
| | | // explicitly created and registered by the LDAP connection handler or an |
| | |
| | | */ |
| | | public String getMonitorInstanceName() |
| | | { |
| | | |
| | | return instanceName; |
| | | } |
| | | |
| | |
| | | */ |
| | | public long getUpdateInterval() |
| | | { |
| | | |
| | | |
| | | // This monitor should not run periodically. |
| | | return -1; |
| | | } |
| | |
| | | */ |
| | | public void updateMonitorData() |
| | | { |
| | | |
| | | // No implementation is required since this does not do periodic updates. |
| | | } |
| | | |
| | |
| | | */ |
| | | public ArrayList<Attribute> getMonitorData() |
| | | { |
| | | |
| | | ArrayList<Attribute> attrs = new ArrayList<Attribute>(29); |
| | | |
| | | long tmpAbandonRequests; |
| | |
| | | */ |
| | | public void clearStatistics() |
| | | { |
| | | |
| | | |
| | | // Quickly grab the locks and store consistent copies of the information. |
| | | // Note that when grabbing multiple locks, it is essential that they are all |
| | | // acquired in the same order to prevent deadlocks. |
| | |
| | | */ |
| | | public void updateConnect() |
| | | { |
| | | |
| | | connectLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public void updateDisconnect() |
| | | { |
| | | |
| | | disconnectLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public void updateBytesRead(int bytesRead) |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public void updateMessageRead(LDAPMessage message) |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public void updateMessageWritten(LDAPMessage message, int bytesWritten) |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public void updateAbandonedOperation() |
| | | { |
| | | |
| | | abandonLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | private Attribute createAttribute(String name, String value) |
| | | { |
| | | |
| | | AttributeType attrType = DirectoryServer.getDefaultAttributeType(name); |
| | | |
| | | ASN1OctetString encodedValue = new ASN1OctetString(value); |
| | |
| | | */ |
| | | public long getConnectionsEstablished() |
| | | { |
| | | |
| | | connectLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getConnectionsClosed() |
| | | { |
| | | |
| | | disconnectLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getBytesRead() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getBytesWritten() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getMessagesRead() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getMessagesWritten() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getOperationsInitiated() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getOperationsCompleted() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getOperationsAbandoned() |
| | | { |
| | | |
| | | abandonLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getAbandonRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getAddRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getAddResponses() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getBindRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getBindResponses() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getCompareRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getCompareResponses() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getDeleteRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getDeleteResponses() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getExtendedRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getExtendedResponses() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getModifyRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getModifyResponses() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getModifyDNRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getModifyDNResponses() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getSearchRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getSearchResultEntries() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getSearchResultReferences() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getSearchResultsDone() |
| | | { |
| | | |
| | | writeLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public long getUnbindRequests() |
| | | { |
| | | |
| | | readLock.lock(); |
| | | |
| | | try |
| | |
| | | */ |
| | | public LDAPStatistics getParent() |
| | | { |
| | | |
| | | return parent; |
| | | } |
| | | } |