public class ClusterConcurrentLazyInsertExecutor extends Object implements LazyInsertExecutor
| Constructor and Description |
|---|
ClusterConcurrentLazyInsertExecutor(com.atlassian.beehive.ClusterLockService lockService) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
lazyInsertAndRead(LazyInserter<T> inserter,
String lockKey)
Try read existing data or insert new data if read returns null, in a way that is concurrent-safe in cluster
|
public ClusterConcurrentLazyInsertExecutor(com.atlassian.beehive.ClusterLockService lockService)
public <T> T lazyInsertAndRead(LazyInserter<T> inserter, String lockKey)
lazyInsertAndRead in interface LazyInsertExecutorlockKey - the key for acquiring lock. Different keys result in different locks (no contention).Copyright © 2017 Atlassian. All rights reserved.