org.infinispan.executors
Class DefaultSharedExecutorFactory

java.lang.Object
  extended by org.infinispan.executors.AbstractSharedExecutorFactory<ExecutorService>
      extended by org.infinispan.executors.DefaultSharedExecutorFactory
All Implemented Interfaces:
ExecutorFactory

public class DefaultSharedExecutorFactory
extends AbstractSharedExecutorFactory<ExecutorService>
implements ExecutorFactory

Default executor factory that creates a single executor and reuses it for subsequent calls to getExecutor(java.util.Properties).

Note that the executor is only shared amongst equivalent configurations (by checking that the Properties passed in are equal). What this means is two calls to getExecutor(java.util.Properties) with 2 inequal properties parameters will result in 2 separate executors being created.

The executors created are standard JDK executors, identical to those created by DefaultExecutorFactory.

Since:
4.2
Author:
Manik Surtani

Constructor Summary
DefaultSharedExecutorFactory()
           
 
Method Summary
protected  ExecutorService createService(Properties p)
           
 ExecutorService getExecutor(Properties p)
           
 
Methods inherited from class org.infinispan.executors.AbstractSharedExecutorFactory
getOrCreateService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSharedExecutorFactory

public DefaultSharedExecutorFactory()
Method Detail

createService

protected ExecutorService createService(Properties p)
Specified by:
createService in class AbstractSharedExecutorFactory<ExecutorService>

getExecutor

public ExecutorService getExecutor(Properties p)
Specified by:
getExecutor in interface ExecutorFactory

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.