Integrated by hand part of the pull request #13 'fix pom and clean deprecated class and add bat file to windows'

This commit is contained in:
andrea
2015-03-04 22:40:56 +01:00
parent 443682f24f
commit 4baf407657
10 changed files with 69 additions and 21 deletions
@@ -85,7 +85,7 @@ public class SimpleMessaging implements IMessaging, EventHandler<ValueEvent> {
public void init(Properties configProps) {
subscriptions = new SubscriptionsStore();
m_executor = Executors.newFixedThreadPool(1);
m_disruptor = new Disruptor<ValueEvent>(ValueEvent.EVENT_FACTORY, 1024 * 32, m_executor);
m_disruptor = new Disruptor<>(ValueEvent.EVENT_FACTORY, 1024 * 32, m_executor);
/*Disruptor<ValueEvent> m_disruptor = new Disruptor<ValueEvent>(ValueEvent.EVENT_FACTORY, 1024 * 32, m_executor,
ProducerType.MULTI, new BusySpinWaitStrategy());*/
m_disruptor.handleEventsWith(this);
@@ -200,7 +200,7 @@ public class SubscriptionsStore {
} catch (ParseException ex) {
//TODO handle the parse exception
LOG.error(null, ex);
return Collections.EMPTY_LIST;
return Collections.emptyList();
}
Queue<Token> tokenQueue = new LinkedBlockingDeque<Token>(tokens);
@@ -274,7 +274,7 @@ public class SubscriptionsStore {
}
protected static List<Token> parseTopic(String topic) throws ParseException {
List res = new ArrayList<Token>();
List<Token> res = new ArrayList<>();
String[] splitted = topic.split("/");
if (splitted.length == 0) {