@TritonMethod("lock.release") public boolean release(Channel channel, TritonMessage message, LockRelease release) { LockOwner owner = new LockOwner(channel, message.getCallId(), release.getOwnerId()); manager.unlock(owner, release.getKey()); return true; }
@TritonMethod(value = "lock.acquire", async = true) public void acquire(Channel channel, TritonMessage message, LockAcquire acquire) { LockOwner owner = new LockOwner(channel, message.getCallId()); manager.lock(owner, acquire.getKey(), acquire.getTimeout()); }