com.bigdata.journal
Class ResourceLockService
java.lang.Object
com.bigdata.journal.ResourceLockService
- All Implemented Interfaces:
- IResourceLockService
public final class ResourceLockService
- extends Object
- implements IResourceLockService
An implementation using NamedLocks suitable for within JVM locking.
- Version:
- $Id: ResourceLockService.java 2265 2009-10-26 12:51:06Z thompsonbry $
- Author:
- Bryan Thompson
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ResourceLockService
public ResourceLockService()
acquireLock
public IResourceLock acquireLock(String namespace)
- Description copied from interface:
IResourceLockService
- Acquire an exclusive lock on the named resource. The request will block
until the lock is available.
- Specified by:
acquireLock in interface IResourceLockService
- Parameters:
namespace - The named resource.
- Returns:
- The lock.
acquireLock
public IResourceLock acquireLock(String namespace,
long timeout)
throws InterruptedException,
TimeoutException
- Description copied from interface:
IResourceLockService
- Acquire an exclusive lock the named resource. The request will block
until the lock is available or the timeout expires.
- Specified by:
acquireLock in interface IResourceLockService
- Parameters:
namespace - The named resource.timeout - Timeout in milliseconds for the request -or-
Long.MAX_VALUE to wait forever.
- Returns:
- The lock.
- Throws:
InterruptedException
TimeoutException
Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.