Skip to content
  • Projects
  • Groups
  • Snippets
  • Help

Codecrew / Moya

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 30
  • Merge Requests 2
  • Wiki
  • Snippets
  • Settings
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
Merged
Merge Request !362 opened Mar 14, 2017 by Tuukka Kivilahti@tkfftk

made some stuff for placequeue, some fixes also

Edited Apr 09, 2017
Request to merge tkfftk:placeQueueFixes into master

Merged

  • The changes were merged into master.
  • The source branch has been removed.
  • Discussion 2
  • Commits 3
  • Changes 17
  • {{ resolvedDiscussionCount }}/{{ discussionCount }} {{ resolvedCountText }} resolved
  • Tuukka Kivilahti @tkfftk

    Added 1 commit:

    • d2001e8d - added biggest first and fixed possibly array bug
    Mar 15, 2017

    Added 1 commit:

    • d2001e8d - added biggest first and fixed possibly array bug
    Toggle commit list
  • E653e45857f523ba676b9ae7a0bab5dd?s=80&d=identicon
    Tuomas Riihimäki
    @tuomari started a discussion on the diff Mar 15, 2017
    code/moya-beans/ejbModule/fi/codecrew/moya/beans/map/MapQueue.java
    36 34 public MapQueue(EventMap map) {
    37 35 this.mapId = map.getId();
    36 }
    37
    38 public MapQueue(EventMap map, MapQueueRules rules) {
    39 this(map);
    38 40  
    41 if(rules != null) {
    42 this.defaultTimeoutMin = rules.getDefaultTimeoutMin();
    43 this.minimumSlotsInQueue = rules.getMinimumSlotsInQueue();
    44 this.reservingSize = rules.getReservingSize();
    45 this.biggestFirst = rules.getBiggestFirst();
    46 }
    39 47 }
    40 48  
    41 void timeoutEntries() {
    • Tuomas Riihimäki @tuomari commented Mar 15, 2017
      Owner

      Wut, Why???

  • E653e45857f523ba676b9ae7a0bab5dd?s=80&d=identicon
    Tuomas Riihimäki
    @tuomari started a discussion on an outdated diff Mar 15, 2017
    code/moya-beans/ejbModule/fi/codecrew/moya/beans/map/MapQueue.java
    81 93  
    82 94 private final AtomicBoolean modifyReservers = new AtomicBoolean(false);
    83 95  
    96
    84 97 private void checkReservingEntry() {
    85 98  
    86 99 if (reserving.size() < getReservingSize() && modifyReservers.compareAndSet(false, true)) {
    87 100  
    88 101 try {
    89 if (reserving.size() < getReservingSize()) {
    90 MapReservationQueueEntry queEntry = queue.poll();
    102 if (reserving.size() < getReservingSize() && !queue.isEmpty()) {
    103
    104 MapReservationQueueEntry queEntry = queue.get(0);
    105 queue.remove(0);
    • Tuomas Riihimäki @tuomari commented Mar 15, 2017
      Owner

      Remove palauttaa poistamansa entryn. Ei ole tarvetta ajaa ensin gettiä ja sitten removea. Teoriassa tässä on mahdollisuus jopa siihen että getin jälkeen jonoon on tullut uusi entry ja removella poistetaankin eri entry kuin getillä on haettu...

      Jos tarvii käyttää ensin gettiä niin List.remove(Object o), jolloin varmasti poistetaan oikea entry

      Edited Mar 15, 2017
  • Tuukka Kivilahti @tkfftk

    Added 1 commit:

    • fc0bf8dc - comment fixes and some more info to event admin
    Apr 07, 2017

    Added 1 commit:

    • fc0bf8dc - comment fixes and some more info to event admin
    Toggle commit list
  • Tuomas Riihimäki @tuomari

    mentioned in commit c402ca8c

    Apr 09, 2017

    mentioned in commit c402ca8c

    Toggle commit list
  • Tuomas Riihimäki @tuomari

    Status changed to merged

    Apr 09, 2017

    Status changed to merged

    Toggle commit list
  • Write
  • Preview
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
  • Please register or sign in to post a comment
Assignee
No assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
0
Labels
None
Assign labels
  • View labels
2
2 participants
Reference: codecrew/moya!362
×

Revert this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.
×

Cherry-pick this merge request

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.