Java synchronization between different JVMs

前端 未结 5 1065
醉话见心
醉话见心 2021-02-08 00:36

The project I am working on would trigger various asynchronous jobs to do some work. As I look into it more these asynchronous jobs are actually being run as separate JVMs (sepa

5条回答
  •  醉话见心
    2021-02-08 01:00

    I have implemented a java IPC Lock implementation using files: FileBasedLock and a IPC Semaphore implementation using a shared DB (jdbc): JdbcSemaphore. Both implementations are part of spf4j.

    If you have a zookeeper instance take a look at the Zookeeper based Lock recipes from Apache Curator

提交回复
热议问题