| | |
| | | * |
| | | * |
| | | * Copyright 2006-2010 Sun Microsystems, Inc. |
| | | * Portions Copyright 2012 ForgeRock AS |
| | | * |
| | | */ |
| | | package org.opends.server.protocols.ldap; |
| | | |
| | |
| | | private AtomicLong operationsCompleted = new AtomicLong(0); |
| | | private AtomicLong operationsInitiated = new AtomicLong(0); |
| | | private AtomicLong searchRequests = new AtomicLong(0); |
| | | private AtomicLong searchOneRequests = new AtomicLong(0); |
| | | private AtomicLong searchSubRequests = new AtomicLong(0); |
| | | private AtomicLong searchResultEntries = new AtomicLong(0); |
| | | private AtomicLong searchResultReferences = new AtomicLong(0); |
| | | private AtomicLong searchResultsDone = new AtomicLong(0); |
| | |
| | | long tmpOperationsCompleted = operationsCompleted.get(); |
| | | long tmpOperationsInitiated = operationsInitiated.get(); |
| | | long tmpSearchRequests = searchRequests.get(); |
| | | long tmpSearchOneRequests = searchOneRequests.get(); |
| | | long tmpSearchSubRequests = searchSubRequests.get(); |
| | | long tmpSearchEntries = searchResultEntries.get(); |
| | | long tmpSearchReferences = searchResultReferences.get(); |
| | | long tmpSearchResultsDone = searchResultsDone.get(); |
| | |
| | | .valueOf(tmpModifyDNResponses))); |
| | | attrs.add(createAttribute("searchRequests", String |
| | | .valueOf(tmpSearchRequests))); |
| | | attrs.add(createAttribute("searchOneRequests", String |
| | | .valueOf(tmpSearchOneRequests))); |
| | | attrs.add(createAttribute("searchSubRequests", String |
| | | .valueOf(tmpSearchSubRequests))); |
| | | attrs.add(createAttribute("searchResultEntries", String |
| | | .valueOf(tmpSearchEntries))); |
| | | attrs.add(createAttribute("searchResultReferences", String |
| | |
| | | operationsCompleted.set(0); |
| | | operationsInitiated.set(0); |
| | | searchRequests.set(0); |
| | | searchOneRequests.set(0); |
| | | searchSubRequests.set(0); |
| | | searchResultEntries.set(0); |
| | | searchResultReferences.set(0); |
| | | searchResultsDone.set(0); |
| | |
| | | break; |
| | | case OP_TYPE_SEARCH_REQUEST: |
| | | searchRequests.getAndIncrement(); |
| | | SearchRequestProtocolOp s = (SearchRequestProtocolOp)message |
| | | .getProtocolOp(); |
| | | switch (s.getScope()) |
| | | { |
| | | case BASE_OBJECT: |
| | | // we don't count base object searches as |
| | | // this value can be derived from the others |
| | | break; |
| | | case SINGLE_LEVEL: |
| | | searchOneRequests.getAndIncrement(); |
| | | break; |
| | | case WHOLE_SUBTREE: |
| | | searchSubRequests.getAndIncrement(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | break; |
| | | case OP_TYPE_UNBIND_REQUEST: |
| | | unbindRequests.getAndIncrement(); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the number of one-level search requests that have been received. |
| | | * |
| | | * @return The number of one-level search requests that have been received. |
| | | */ |
| | | public long getSearchOneRequests() |
| | | { |
| | | return searchOneRequests.get(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the number of subtree search requests that have been received. |
| | | * |
| | | * @return The number of subtree search requests that have been received. |
| | | */ |
| | | public long getSearchSubRequests() |
| | | { |
| | | return searchSubRequests.get(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the number of search result entries that have been sent. |
| | | * |
| | | * @return The number of search result entries that have been sent. |