Search in sources :

Example 1 with BoltConnectionTracker

use of org.neo4j.kernel.api.bolt.BoltConnectionTracker in project neo4j by neo4j.

the class EnterpriseBuiltInDbmsProcedures method listConnections.

//@Procedure( name = "dbms.listConnections", mode = DBMS )
public Stream<ConnectionResult> listConnections() {
    assertAdmin();
    BoltConnectionTracker boltConnectionTracker = getBoltConnectionTracker(graph.getDependencyResolver());
    return countConnectionsByUsername(boltConnectionTracker.getActiveConnections().stream().filter(session -> !session.willTerminate()).map(ManagedBoltStateMachine::owner));
}
Also used : BoltConnectionTracker(org.neo4j.kernel.api.bolt.BoltConnectionTracker)

Aggregations

BoltConnectionTracker (org.neo4j.kernel.api.bolt.BoltConnectionTracker)1