0

I am a newbie to java technology and have a little idea about design patterns. I have to write a java application that contains 3 independent threads:

  • the first thread is used to write on a file "A"
  • the second one is used to write on a file "B"
  • and when the writing on file done an another independent thread "C" merge these two file.

I have to write the application as efficient as possible. I am thinking about using design pattern. Is there any design pattern that fits the scenario best?

Alexei - check Codidact
  • 22,016
  • 16
  • 145
  • 164
Razib
  • 10,965
  • 11
  • 53
  • 80
  • 1
    First things first - do you have an SSD or hardware RAID array? If not then writing two files at once will be _slower_ than writing one. Second, have you tried anything? If so post it. – Boris the Spider Apr 20 '14 at 19:21
  • I would [read this](http://java.dzone.com/articles/java-8-definitive-guide) to get an idea of where to start. – Boris the Spider Apr 20 '14 at 19:25
  • Your question sounds like homework. Is it? – Fuhrmanator Apr 21 '14 at 14:39
  • 1
    @BoristheSpider This [link at Tomasz Nurkiewicz' site](http://www.nurkiewicz.com/2013/05/java-8-definitive-guide-to.html) gives a more faithful representation (there are missing parts in the link you cited). – Fuhrmanator Apr 21 '14 at 18:47

0 Answers0