Michael Kublin has posted comments on this change. Change subject: engine: Added infrastructure for providing a canDoactions in case of locks ......................................................................
Patch Set 1: (3 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/lock/InMemoryLockManager.java Line 142: } Line 143: Line 144: @Override Line 145: public boolean releaseLock(String lockId) { Line 146: log.warnFormat("The following lock is going to be released via external call, lockId {0}, error message can be left for shared lock", These is API which can be called via JMX, so a clean of lock can be done only by lockId, so I don't know what message is associated with lock in case that it read only. Line 147: lockId); Line 148: globalLock.lock(); Line 149: try { Line 150: InternalLockView lock = locks.get(lockId); Line 312: private int count; Line 313: /** Indicate if the lock is exclusive and not allowing any other exclusive/shared locks with the same key **/ Line 314: private final boolean exclusive; Line 315: /** Contains a error messages for that key **/ Line 316: private List<String> messages; Reason is , I have 5 operations with the same message and one with another I want return two messages in canDoaction, but when one of the read lock freed, we should left with 4 same messages and one different. Line 317: Line 318: public InternalLockView(int count, String message, boolean exclusive) { Line 319: this.count = count; Line 320: this.exclusive = exclusive; Line 317: Line 318: public InternalLockView(int count, String message, boolean exclusive) { Line 319: this.count = count; Line 320: this.exclusive = exclusive; Line 321: messages = new ArrayList<String>(); these is more code stile, I like that way Line 322: messages.add(message); Line 323: } Line 324: Line 325: public boolean getExclusive() { -- To view, visit http://gerrit.ovirt.org/11738 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I87698da36ddb6e7556e98612d299da68f2eb53dc Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Daniel Erez <de...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Shireesh Anjal <san...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches