public static EventAllocator defaultEventAllocator() {
return new EventAllocator() {
@SuppressWarnings("unchecked")
@Override
protected <T> Allocator<Event<T>> makeAllocator(Class<T> klass) {
return new ReferenceCountingAllocator<Event<T>>(new EventFactorySupplier(klass));
}
};
}