Module io.github.bucket4j.core
Interface LockIdSupplier<K>
-
- Type Parameters:
K- type of key
public interface LockIdSupplier<K>Used by some inheritors ofAbstractLockBasedProxyManagerwhen it needs to calculate numeric value of locks.
-
-
Field Summary
Fields Modifier and Type Field Description static LockIdSupplier<?>DEFAULT
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longtoLockId(K key)Returns the lock-id specified with the key.
-
-
-
Field Detail
-
DEFAULT
static final LockIdSupplier<?> DEFAULT
-
-
Method Detail
-
toLockId
long toLockId(K key)
Returns the lock-id specified with the key.- Parameters:
key- the key of bucket- Returns:
- id of lock specified with key
-
-