All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gc.iotools.stream.base.ExecutionModel Maven / Gradle / Ivy

package com.gc.iotools.stream.base;

/*
 * Copyright (c) 2008,2009 Davide Simonetti.
 * This source code is released under the BSD License.
 */

/**
 * 

* This class enumerates the policies for instantiating Threads in * classes of EasyStream library that needs of them. *

* * @author dvd.smnt * @since 1.0 * @see #com.gc.iotools.stream.is.InputStreamFromOutputStream(ExecutionModel) * @see #com.gc.iotools.stream.os.OutputStreamToInputStream(ExecutionModel) */ public enum ExecutionModel { /** *

* Threads are taken from a static pool. *

*

* Some slow thread might lock up the pool and other processes might be * slowed down. *

* * @see java.util.concurrent.ThreadPoolExecutor */ STATIC_THREAD_POOL, /** *

* One thread per instance of class. Slow but each instance can work in * isolation. Also if some thread is not correctly closed there might be * threads leaks. *

*/ THREAD_PER_INSTANCE, /** *

* Only one thread is shared by all instances (slow). *

*/ SINGLE_THREAD }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy