Java for model of Porductor-Consumer