net.anotheria.anoprise.queue.BoundedFifoQueueFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ano-prise Show documentation
Show all versions of ano-prise Show documentation
Collection of utils for different enterprise class projects. Among other stuff contains
Caches, Mocking, DualCrud, MetaFactory and SessionDistributorService. Visit https://opensource.anotheria.net for details.
package net.anotheria.anoprise.queue;
import java.util.concurrent.ArrayBlockingQueue;
/**
* Factory to create bounded FIFO queue.
* @author dmeltelin
*
* @param
*/
public class BoundedFifoQueueFactory implements EnterpriseQueueFactory{
@Override
public EnterpriseQueue createQueue(int capacity) {
ArrayBlockingQueue delegate = new ArrayBlockingQueue(capacity);
return new EnterpriseQueueAdapter(delegate, capacity);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy