public void notifyListeners(DistributedEvent distributedEvent) {
        final List<ISemiEventListener> toNotify = new ArrayList<ISemiEventListener>();
        ListenerHolder[] listenerArray = listeners.values().toArray(new ListenerHolder[0]);
        Arrays.sort( listenerArray, new ShortestTtlComparator());
        for (ListenerHolder listener : listenerArray) {
            if (listener.getLiveUntil() < admin.calculateTime()) {

                cancelListener( listener );

            } else if (hasSubSet(distributedEvent.getEntrySet(), listener.getSearchMap(), false, null, null)) {
                ISemiEventListener notifyMe = listener.getListener();
                toNotify.add(notifyMe);
            }
        }
        final SemiEvent event = distributedEvent.getEvent();
        for (ISemiEventListener notify : toNotify) {
                try {
                    notify.notify(event);
                } catch (ClassCastException ignored ) {
                    // Sadly enough, I need to ignore this due to type erasure.
                }
        }

        
        admin.notifyAboutEvent(distributedEvent);
    }