public final class ResourceLockService extends Object implements IResourceLockService
NamedLock
s suitable for within JVM locking.Constructor and Description |
---|
ResourceLockService() |
Modifier and Type | Method and Description |
---|---|
IResourceLock |
acquireLock(String namespace)
Acquire an exclusive lock on the named resource.
|
IResourceLock |
acquireLock(String namespace,
long timeout)
Acquire an exclusive lock the named resource.
|
public IResourceLock acquireLock(String namespace)
IResourceLockService
acquireLock
in interface IResourceLockService
namespace
- The named resource.public IResourceLock acquireLock(String namespace, long timeout) throws InterruptedException, TimeoutException
IResourceLockService
acquireLock
in interface IResourceLockService
namespace
- The named resource.timeout
- Timeout in milliseconds for the request -or-
Long.MAX_VALUE
to wait forever.InterruptedException
TimeoutException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.