public interface LazyInsertExecutor
| Modifier and Type | Method and Description |
|---|---|
<T> T |
lazyInsertAndRead(LazyInserter<T> inserter,
String lockKey)
Do a non-lock read first, then if find no result, do a re-read and
insert inside a lock.
|
<T> T lazyInsertAndRead(LazyInserter<T> inserter, String lockKey)
Most of the time (except for the first couple concurrent reads), the first read succeeds and returns right away, so we don't need a lock.
lockKey - the key for acquiring lock. Different keys result in different locks (no contention).Copyright © 2017 Atlassian. All rights reserved.