Reputation: 17648
Is there a native JDK solution for storing objects in memory, over a network? In particular, a way to share and synchronize a semaphore ?
Upvotes: 0
Views: 1229
Reputation: 128849
It depends what exactly you mean by "native JDK solution". Netflix Curator, a rich client for ZooKeeper, is pure Java and has a cross-JVM Semaphore implementation which does exactly what it sounds like: providing shared leases across all participating JVMs. Curator is available in Maven Central if that makes a difference.
Upvotes: 1
Reputation: 5290
You should try Java RMI: http://docs.oracle.com/javase/tutorial/rmi/index.html
I think it should be able to provide synchronisation over the net. If you don't want to use a server like Zookeeper, this is the best solution I can think of.
Upvotes: 0