| | |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.IntermediateResponse; |
| | | import org.opends.server.types.Operation; |
| | | import org.opends.server.types.OperationType; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchResultReference; |
| | |
| | | { |
| | | return false; |
| | | } |
| | | else |
| | | |
| | | if (operation.getOperationType() == OperationType.ABANDON) |
| | | { |
| | | lastCompletionTime.set(TimeThread.getTime()); |
| | | return true; |
| | | if (keepStats |
| | | && (operation.getResultCode() == ResultCode.CANCELED)) |
| | | { |
| | | statTracker.updateAbandonedOperation(); |
| | | } |
| | | } |
| | | |
| | | lastCompletionTime.set(TimeThread.getTime()); |
| | | return true; |
| | | } |
| | | |
| | | |
| | |
| | | private boolean processAbandonRequest(LDAPMessage message, |
| | | List<Control> controls) |
| | | { |
| | | if ((ldapVersion == 2) && (controls != null) |
| | | && (!controls.isEmpty())) |
| | | { |
| | | // LDAPv2 clients aren't allowed to send controls. |
| | | disconnect(DisconnectReason.PROTOCOL_ERROR, false, |
| | | ERR_LDAPV2_CONTROLS_NOT_ALLOWED.get()); |
| | | return false; |
| | | } |
| | | |
| | | // Create the abandon operation and add it into the work queue. |
| | | AbandonRequestProtocolOp protocolOp = |
| | | message.getAbandonRequestProtocolOp(); |
| | | AbandonOperationBasis abandonOp = |
| | |
| | | .getAndIncrement(), message.getMessageID(), controls, |
| | | protocolOp.getIDToAbandon()); |
| | | |
| | | abandonOp.run(); |
| | | if (keepStats && (abandonOp.getResultCode() == ResultCode.CANCELED)) |
| | | try |
| | | { |
| | | statTracker.updateAbandonedOperation(); |
| | | addOperationInProgress(abandonOp); |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | |
| | | // Don't send an error response since abandon operations |
| | | // don't have a response. |
| | | } |
| | | |
| | | return connectionValid; |