use of com.conversantmedia.util.concurrent.DisruptorBlockingQueue in project karaf by apache.
the class Activator method createQueue.
@SuppressWarnings("unchecked")
private BlockingQueue<EventImpl> createQueue() throws Exception {
String type = getString(QUEUE_TYPE, null);
int size = getInt(QUEUE_SIZE, 1024);
if ("ArrayBlockingQueue".equals(type)) {
return new ArrayBlockingQueue<>(size);
} else if ("DisruptorBlockingQueue".equals(type)) {
return new DisruptorBlockingQueue(size);
} else if (type != null) {
logger.warn("Unknown queue type: " + type + "");
}
try {
return new DisruptorBlockingQueue(size);
} catch (NoClassDefFoundError t) {
return new ArrayBlockingQueue<>(size);
}
}
Aggregations