ehcache

net.sf.ehcache.transaction.xa.processor
Class XAThreadPool.MultiRunner

java.lang.Object
  extended by net.sf.ehcache.transaction.xa.processor.XAThreadPool.MultiRunner
All Implemented Interfaces:
Runnable
Enclosing class:
XAThreadPool

public static final class XAThreadPool.MultiRunner
extends Object
implements Runnable

Pooled thread wrapper which allows reuse of the same thread


Method Summary
 Object execute(Callable callable)
          Execute a Callable on the wrapped thread and return its result
 void release()
          Release the wrapped thread back the the containing thread pool
 void run()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

execute

public Object execute(Callable callable)
               throws ExecutionException,
                      InterruptedException
Execute a Callable on the wrapped thread and return its result

Parameters:
callable - The Callable to execute
Returns:
the Object returned by the Callable
Throws:
ExecutionException - thrown when something went wrong during execution
InterruptedException - thrown when the executing thread got interrupted

release

public void release()
Release the wrapped thread back the the containing thread pool


run

public void run()

Specified by:
run in interface Runnable

ehcache

Copyright 2001-2014, Terracotta, Inc.