DistributedLock lock = new DistributedLock("/locks/lock1"); lock.lock(); try { // ... } finally { lock.unlock(); } DistributedQueue queue = new DistributedQueue("/queues/queue1"); queue.offer("message1"); queue.offer("message2"); String message = queue.poll();


上一篇:
下一篇:
切换中文