This is fine, but you could remove the minSize check if you want. It seems redundant. The only important number is desiredCapacity.