com.atlassian.util.concurrent
Class ConcurrentOperationMapImpl<K,R>
java.lang.Object
com.atlassian.util.concurrent.ConcurrentOperationMapImpl<K,R>
- All Implemented Interfaces:
- ConcurrentOperationMap<K,R>
@ThreadSafe
public class ConcurrentOperationMapImpl<K,R>
- extends Object
- implements ConcurrentOperationMap<K,R>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConcurrentOperationMapImpl
public ConcurrentOperationMapImpl()
runOperation
public R runOperation(K key,
Callable<R> operation)
throws ExecutionException
- Description copied from interface:
ConcurrentOperationMap
- The operation will be keyed on the name .
- Specified by:
runOperation
in interface ConcurrentOperationMap<K,R>
- Parameters:
key
- the key, like any map key this should be an immutable object
that correctly implements Object.hashCode()
and
Object.equals(Object)
operation
- is the operation to execute whose result will be
accessible to any concurrent callers with the same key.
- Returns:
- result of the operation
- Throws:
ExecutionException
- if the callable generated a checked exception,
otherwise a runtime exception or error will be thrown
Copyright © 2014 Atlassian. All Rights Reserved.