Change in ovirt-engine[master]: core: add executor for execution of runnables with CountDown...
tnisan at redhat.com
tnisan at redhat.com
Mon Dec 31 16:07:45 UTC 2012
Tal Nisan has submitted this change and it was merged.
Change subject: core: add executor for execution of runnables with CountDownLatch
......................................................................
core: add executor for execution of runnables with CountDownLatch
This patch adds LatchedRunnableExecuter to be able to execute
LatchedRunnableWrapper (pre existing class) instances using
CountDownLatch.
1. LatchedRunnableExecuter basically could have been implemented as
class whose instances cannot be created and with static methods only -
it's has been
implemented like this in order to provide proper testing (creating
instances of it is rare, so it shouldn't matter in terms of
garbage collection), a singleton isn't used as well as it's being used
only from Reconstruct flow which is rare,
so I prefer to create instance when needed instead of having permanent
instance of it.
2. Handle of rejected submission of runnables was removed last
patch because its abnormal situation that we shouldn't reach at all in
that case according to infra so there's no need to submit runnable again
if it failed.
3. Handle of InterruptedException : right now it's caught only as it's
being taken care of in other places in the code.
Change-Id: Ia56ff4afac01803ac0753dbf88fcfbfd34e2e56d
Signed-off-by: Liron Aravot <laravot at redhat.com>
---
A backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/thread/LatchedRunnableExecutor.java
M backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/thread/LatchedRunnableWrapperTest.java
2 files changed, 167 insertions(+), 26 deletions(-)
Approvals:
Tal Nisan: Verified; Looks good to me, approved
--
To view, visit http://gerrit.ovirt.org/10354
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia56ff4afac01803ac0753dbf88fcfbfd34e2e56d
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Ayal Baron <abaron at redhat.com>
Gerrit-Reviewer: Daniel Erez <derez at redhat.com>
Gerrit-Reviewer: Liron Aravot <laravot at redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipchuk at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: Vered Volansky <vvolansk at redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzaslavs at redhat.com>
More information about the Engine-commits
mailing list