In Jmix, how can one get the count of active user sessions? In CUBA, we did:
@Inject
private UserSessionsAPI userSessions;
and then,
private int getAllSessionCount() {
return (int) userSessions.getUserSessionsStream().count();
}
private int getNonSystemSessionCount() {
return (int) userSessions.getUserSessionsStream().filter(s -> !s.isSystem()).count();
}
Obviously, in Jmix there is no UserSessionsAPI
and its replacement isn’t mentioned in the migration docs.
Ideas?