public enum NullLockFactory extends Enum<NullLockFactory> implements LockFactory
LockingRepository
needs to be configured to ignore locks, for example in scenario's
where an underlying storage mechanism already performs the necessary locking.Enum Constant and Description |
---|
INSTANCE
Singleton instance of a
NullLockFactory . |
Modifier and Type | Method and Description |
---|---|
Lock |
obtainLock(String identifier)
Obtain a lock for a resource identified by given
identifier . |
static NullLockFactory |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NullLockFactory[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NullLockFactory INSTANCE
NullLockFactory
.public static NullLockFactory[] values()
for (NullLockFactory c : NullLockFactory.values()) System.out.println(c);
public static NullLockFactory valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic Lock obtainLock(String identifier)
identifier
. Depending on the strategy, this
method may return immediately or block until a lock is held.
This implementation does nothing.obtainLock
in interface LockFactory
identifier
- the identifier of the resource to obtain a lock for.Copyright © 2010–2018. All rights reserved.