Uploaded image for project: 'Bookkeeper'
  1. Bookkeeper
  2. BOOKKEEPER-1066

Introduce GrowableArrayBlockingQueue

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.5.0
    • Component/s: None
    • Labels:
      None

      Description

      In multiple places, (eg: journal, ordered executor, etc..), we are using LinkedBlockingQueue instances to pass objects between threads.

      The LinkedBlockingQueue differs from the ArrayBlockingQueue in that it doesn't require to define a max queue size, though, being implemented with a linked list, it requires to allocates list nodes each time an item is added.

      We can use a GrowableArrayBlockingQueue that behaves in the same way as the LinkedBlockingQueue, but it's implemented with an array that can be resized when the queue reaches the capacity.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mmerli Matteo Merli
                Reporter:
                mmerli Matteo Merli
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: