public interface ExpirableLockRegistry extends LockRegistry
LockRegistry implementing this interface supports the removal of aged locks
that are not currently locked.| 限定符和类型 | 字段和说明 |
|---|---|
static long |
DEFAULT_EXPIRE_UNUSED_OLDER_THEN_TIME
本地锁超时时间
默认1小时
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
expireUnusedOlderThan(long age)
Remove locks last acquired more than 'age' ago that are not currently locked.
|
default long |
getDefaultExpireUnusedOlderThanTime()
获取默认本地锁超时失效时间
|
obtainstatic final long DEFAULT_EXPIRE_UNUSED_OLDER_THEN_TIME
default long getDefaultExpireUnusedOlderThanTime()
void expireUnusedOlderThan(long age)
age - the time since the lock was last obtained.IllegalStateException - if the registry configuration does not support this feature.Copyright © 2018 Pivotal Software, Inc.. All rights reserved.