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

jdemendi
19.46.2007 acc692bb4472fd3de411e6d10a2d32a916855460
refs
author jdemendi <jdemendi@localhost>
Thursday, July 19, 2007 09:46 +0200
committer jdemendi <jdemendi@localhost>
Thursday, July 19, 2007 09:46 +0200
commitacc692bb4472fd3de411e6d10a2d32a916855460
tree 6f45f6eaaaba7148b2e6fe9e75148137fa8c65a0 tree | zip | gz
parent 0718b11e1fc446e09f2720f9578c28c08650648b 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
opendj-sdk/opends/src/server/org/opends/server/core/AddOperationBasis.java 157 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/BindOperationBasis.java 92 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/CompareOperationBasis.java 68 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/DeleteOperationBasis.java 148 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/ModifyDNOperationBasis.java 222 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/ModifyOperationBasis.java 147 ●●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/core/SearchOperationBasis.java 64 ●●●● diff | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/workflowelement/localbackend/LocalBackendWorkflowElement.java 95 ●●●● diff | view | raw | blame | history