I want to read and write into a Java list at the same time.
for example, I want to fill my list from a data source (ex: producers), and read the data using other programs (Apache storm with spot).
to give you a clear idea there is a broker who sends data to Apache storm: Broker -> My API Broker ->spout -> Bolt so my api receive data and try to fill my list and the spout read data, and remove it from the list.
but if tried to do this, I will receive the exception : ConcurrentModificationException