Package com.pi4j.concurrent
Class DefaultExecutorServiceFactory
- java.lang.Object
- 
- com.pi4j.concurrent.DefaultExecutorServiceFactory
 
- 
- All Implemented Interfaces:
- ExecutorServiceFactory
 - Direct Known Subclasses:
- SingleThreadGpioExecutorServiceFactory
 
 public class DefaultExecutorServiceFactory extends Object implements ExecutorServiceFactory 
- 
- 
Constructor SummaryConstructors Constructor Description DefaultExecutorServiceFactory()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutorServicegetEventExecutorService()ExecutorServicegetGpioEventExecutorService()ScheduledExecutorServicegetScheduledExecutorService()return an instance to the scheduled executor service (wrapper)protected static ThreadFactorygetThreadFactory(String nameFormat)return an instance to the thread factory used to create new executor servicesExecutorServicenewSingleThreadExecutorService()return a new instance of a single thread executor service This method is deprecated in favor of the getGpioEventExecutorService - which provides better guarantees around resource managementvoidshutdown()shutdown executor threadsprotected voidshutdownExecutor(ExecutorService executor)
 
- 
- 
- 
Method Detail- 
getThreadFactoryprotected static ThreadFactory getThreadFactory(String nameFormat) return an instance to the thread factory used to create new executor services
 - 
getScheduledExecutorServicepublic ScheduledExecutorService getScheduledExecutorService() return an instance to the scheduled executor service (wrapper)- Specified by:
- getScheduledExecutorServicein interface- ExecutorServiceFactory
 
 - 
getGpioEventExecutorServicepublic ExecutorService getGpioEventExecutorService() - Specified by:
- getGpioEventExecutorServicein interface- ExecutorServiceFactory
 
 - 
getEventExecutorServicepublic ExecutorService getEventExecutorService() - Specified by:
- getEventExecutorServicein interface- ExecutorServiceFactory
 
 - 
newSingleThreadExecutorServicepublic ExecutorService newSingleThreadExecutorService() return a new instance of a single thread executor service This method is deprecated in favor of the getGpioEventExecutorService - which provides better guarantees around resource management- Specified by:
- newSingleThreadExecutorServicein interface- ExecutorServiceFactory
 
 - 
shutdownpublic void shutdown() shutdown executor threads- Specified by:
- shutdownin interface- ExecutorServiceFactory
 
 - 
shutdownExecutorprotected void shutdownExecutor(ExecutorService executor) 
 
- 
 
-