Skip to content

michallichvar/producer-consumer-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Producer-consumer pattern solution

Solves this assigned task:

Create program in Java language that will process commands from FIFO queue using Producer – Consumer pattern.
Supported commands are the following:

  • Add - adds a user into a database
  • PrintAll – prints all users into standard output
  • DeleteAll – deletes all users from database

User is defined as database table SUSERS with columns (USER_ID, USER_GUID, USER_NAME) Demonstrate program on the following sequence (using main method or test):

Add (1, "a1", "Robert")
Add (2, "a2", "Martin")
PrintAll
DeleteAll
PrintAll

Show your ability to unit test code on at least one class.
Goal of this exercise is to show Java language and JDK know-how, OOP principles, clean code understanding, concurrent programming knowledge, unit testing experience.
Please do not use Spring framework in this exercise. Embedded database is sufficient.

Requirements

For building and running the project you need:

Compile

mvn compile

About

Solution for producer-consumer pattern

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages