com.atlassian.jira.util.concurrent
Class ConcurrentOperationMapImpl

java.lang.Object
  extended by com.atlassian.jira.util.concurrent.ConcurrentOperationMapImpl
All Implemented Interfaces:
ConcurrentOperationMap

public class ConcurrentOperationMapImpl
extends Object
implements ConcurrentOperationMap


Constructor Summary
ConcurrentOperationMapImpl()
           
 
Method Summary
(package private)  Object runAndGet(edu.emory.mathcs.backport.java.util.concurrent.FutureTask namedFuture)
           
 Object runOperation(Object key, edu.emory.mathcs.backport.java.util.concurrent.Callable operation)
          The operation will be keyed on the name .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConcurrentOperationMapImpl

public ConcurrentOperationMapImpl()
Method Detail

runOperation

public Object runOperation(Object key,
                           edu.emory.mathcs.backport.java.util.concurrent.Callable operation)
                    throws edu.emory.mathcs.backport.java.util.concurrent.ExecutionException
Description copied from interface: ConcurrentOperationMap
The operation will be keyed on the name .

Specified by:
runOperation in interface ConcurrentOperationMap
Parameters:
key - the key, like any map key this should be an immutable object that correctly implements #hashCode() and #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:
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException - if the callable generated a checked exception, otherwise a runtime exception or error will be thrown

runAndGet

Object runAndGet(edu.emory.mathcs.backport.java.util.concurrent.FutureTask namedFuture)
           throws edu.emory.mathcs.backport.java.util.concurrent.ExecutionException
Throws:
edu.emory.mathcs.backport.java.util.concurrent.ExecutionException


Copyright © 2002-2007 Atlassian. All Rights Reserved.