Skip to main content

Java Threadsafety/Documentation

Comments

4 comments

  • Itay Taragano

    Hi Francis,

    If you initialize Cloudinary objects per thread, it should be thread safe.

    We have full documentation available at:  http://cloudinary.com/documentation/java_integration

    In addition, javadoc jar available for download at:  http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22cloudinary%22

    0
  • Francis Van Wetering

    Well, if I instantiate a separate object in every thread, it's rather trivially threadsafe, isn't it?  I'm building a REST API which consumes Cloudinary information, and verifies via the API.  I'd gain a significant amount of speed by initializing it in the static initializer, and allowing each thread to perform its own calls to the API on the same object.  So, are the Cloudinary Objects thread safe, or is concurrent access to an Object dangerous?

    0
  • Itay Taragano

    Hi Francis,

    As long as you don't update the config map concurrently and don't share Url and Transformation objects, everything should be fine.

    0
  • Francis Van Wetering

    Great, thank you!

    0

Post is closed for comments.