public interface IResourceLockService
The other feature is distributed locks without deadlock detection. This is the kind of lock that you get with zookeeper. When running in a single JVM java.util.concurrent.locks provides this kind of locking. These locks are good for coordinating actions such as who is the master in some computation.
This second role (global synchronous locks without deadlock detection) can be
realized by a client library. When running in a single JVM, the
java.util.concurrent.locks package can provide the implementation. When
running in a distributed environment, zookeeper can provide the
FIXME The main use of this interface today is creating and destroying
relations, relation containers, and their indices "atomically". Unisolated
operations CAN NOT be used to create more than a single resource atomically.
A full tx should be used instead. The place where this happens is
AbstractResource.acquireExclusiveLock(). That is invoked only when
creating or destroying a resource. All callers should be using a full tx
instead when creating or destroying a resource!
IResourceLock acquireLock(String namespace)
IResourceLock acquireLock(String namespace, long timeout) throws InterruptedException, TimeoutException
Copyright © 2006–2016 SYSTAP, LLC DBA Blazegraph. All rights reserved.