@Override
    public Stream<? extends CasEvent> getEventsForPrincipal(final String id) {
        return cache
            .asMap()
            .values()
            .stream()
            .filter(e -> e.getPrincipalId().equalsIgnoreCase(id));
    }
This is {@link InMemoryCasEventRepository}.

@author Misagh Moayyed
@since 5.1.0
support/cas-server-support-events-memory/src/main/java/org/apereo/cas/support/events/dao/InMemoryCasEventRepository.java