org.infinispan.executors
Class DefaultSharedScheduledExecutorFactory

java.lang.Object
  extended by org.infinispan.executors.AbstractSharedExecutorFactory<ScheduledExecutorService>
      extended by org.infinispan.executors.DefaultSharedScheduledExecutorFactory
All Implemented Interfaces:
ScheduledExecutorFactory

public class DefaultSharedScheduledExecutorFactory
extends AbstractSharedExecutorFactory<ScheduledExecutorService>
implements ScheduledExecutorFactory

Default executor factory that creates a single scheduled executor and reuses it for subsequent calls to getScheduledExecutor(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 getScheduledExecutor(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
DefaultSharedScheduledExecutorFactory()
           
 
Method Summary
protected  ScheduledExecutorService createService(Properties p)
           
 ScheduledExecutorService getScheduledExecutor(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

DefaultSharedScheduledExecutorFactory

public DefaultSharedScheduledExecutorFactory()
Method Detail

createService

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

getScheduledExecutor

public ScheduledExecutorService getScheduledExecutor(Properties p)
Specified by:
getScheduledExecutor in interface ScheduledExecutorFactory

Google Analytics

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