mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jdemendi
19.46.2007 1ad53161c35dfbd2c08b1f124d237f5f3cad9110
refs
author jdemendi <jdemendi@localhost>
Thursday, July 19, 2007 09:46 +0200
committer jdemendi <jdemendi@localhost>
Thursday, July 19, 2007 09:46 +0200
commit1ad53161c35dfbd2c08b1f124d237f5f3cad9110
tree 3d8e3ab74fcb8150ce83a26a2cf637a04950de8e tree | zip | gz
parent 0bce3ec87ff3b2d6dabf7c90174bd3953d7cd5c1 view | diff
This set of changes is aiming at having a more consistent
and clean code when an operation is canceled.

With the refactoring, the processing of an operation is split
into a global processing (in XxxOperationBasis) and a local
processing (in LocalBackendWorkflowElement). Because of
that split, we have some piece of code that are duplicated
at the global level and at the local level. For example, whenever
an operation is canceled we have to call indicateCancelled()
then stop the processing time, then log the response and
then invoke the post response plugins. Moreover, the call
to startProcessingTime is done at the global level while the
stopProcessingTime may be called at the local level, which
is not a good thing.

With the new code:
- do not process canceled operation in local processing
- try to not duplicated the code when an operation is canceled
- try to not duplicated the code when a connection is terminated
- When a terminated connection or a canceled operation is
detected in the local processing we just return to the global
processing and let the global processing handle the case

Now, right after the processing bloc at the global level:

- if a connection is terminated
-- call stopProcessingTime
-- log the response

- elsif the operation has been canceled
-- call indicateCancelled
-- call stopProcessingTime
-- log the response
-- invoke the post response plugins

- else (normal case)
-- call stopProcessingTime
-- send the response
-- log the response
-- notify the persistent searches (for Add, Delete, Modify, ModifyDN)
-- invoke the post response plugins

8 files modified
993 ■■■■■ changed files
opends/src/server/org/opends/server/core/AddOperationBasis.java 157 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/BindOperationBasis.java 92 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/CompareOperationBasis.java 68 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/DeleteOperationBasis.java 148 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/ModifyDNOperationBasis.java 222 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/ModifyOperationBasis.java 147 ●●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/core/SearchOperationBasis.java 64 ●●●● diff | view | raw | blame | history
opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java 95 ●●●● diff | view | raw | blame | history