Scenario: My producer fills the array up, say capacity new int[10], before my consumer gets a chance to consume any. My producer sees the array is full and blocks.
Then my consumer comes along and removes int[0], and signals to the producer that the array now has an empty slot to fill.
My producer wakes up, and tries to add a new element to the array. Considering only int[0] is free, and we are implementing FIFO, does ArrayBlockingQueue shuffle all the remaining 9 elements to the left, filling 0-8 indexes and leave int[9] free for the producer?
I've looked at the implementation but don't see any array copy functionality,