apache-metamodel

Is Apache metamodel thread safe?


I am using Apache metamodel to access information stored in CSV and Excel files. I am only performing read operations. I am wondering if it is safe to create only a single instance of DataContext for each file and reuse it across multiple threads.

I was not able to find a clear statement on this issue on the project's documentation page.

Regards, Dan


Solution

  • Yes, it is thread-safe.

    A few operations (only updates AFAIK) cannot be parallelized, so they are synchronized (by MetaModel itself).