Yair Zaslavsky has posted comments on this change.
Change subject: engine: Introducing a queue for failovers event
......................................................................
Patch Set 1: (4 inline comments)
I understood the general approach, and I agree.
However, I would prefer if we speak about it f2f so you can explain more + add
more comments on this.
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/eventqueue/EventQueueMonitor.java
Line 34: public class EventQueueMonitor implements EventQueue {
Line 35:
Line 36: private static Log log =
LogFactory.getLog(EventQueueMonitor.class);
Line 37:
Line 38: private static final ConcurrentMap<Guid, ReentrantLock>
poolsLockMap = new ConcurrentHashMap<Guid, ReentrantLock>();
Several questions -
1. Sorry for the somewhat heretic question - but, why do we need a bean?
2. Why not having it @Singleton ?
Line 39: private static final Map<Guid, Queue<Pair<Event,
FutureTask<EventResult>>>> poolsEventsMap =
Line 40: new HashMap<Guid, Queue<Pair<Event,
FutureTask<EventResult>>>>();
Line 41: private static final Map<Guid, Event> poolCurrentEventMap = new
HashMap<Guid, Event>();
Line 42:
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/eventqueue/Event.java
Line 1: package org.ovirt.engine.core.common.eventqueue;
Why is it in common and not in utils?
common is exposed to frontend. is this necessary?
Line 2:
Line 3: import org.ovirt.engine.core.compat.Guid;
Line 4:
Line 5: public class Event {
Line 1: package org.ovirt.engine.core.common.eventqueue;
Line 2:
Line 3: import org.ovirt.engine.core.compat.Guid;
Line 4:
Line 5: public class Event {
I would rename the class name.
StoragePoolEvent?
StoragePoolActionEvent?
Line 6:
Line 7: private Guid storagePoolId;
Line 8: private Guid domainId;
Line 9: private EventType eventType;
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/eventqueue/EventQueue.java
Line 1: package org.ovirt.engine.core.common.eventqueue;
Line 2:
Line 3: import java.util.concurrent.Callable;
Line 4:
Line 5: public interface EventQueue {
Might need change in interface name, as explained before.
Line 6:
Line 7: /**
Line 8: * The following method should allow to submit asynchronous event
Line 9: * Event will be submitted to queue and will be executed when after
that
--
To view, visit http://gerrit.ovirt.org/9838
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1224feacdcdaaaf0b59d26105805ba7ef2a2fff
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Michael Kublin <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches