Package com.foundationdb.sql.server

Examples of com.foundationdb.sql.server.ServerSessionMonitor


    private static final Logger logger = LoggerFactory.getLogger(JDBCConnection.class);
    protected static final String SERVER_TYPE = "JDBC";

    protected JDBCConnection(ServerServiceRequirements reqs, Properties info) {
        super(reqs);
        sessionMonitor = new ServerSessionMonitor(SERVER_TYPE, reqs.monitor().allocateSessionId());
        inheritFromCall();
        if ((defaultSchemaName != null) &&
            (info.getProperty("database") == null))
            info.put("database", defaultSchemaName);
        setProperties(info);
View Full Code Here


        this.socket = socket;
        this.sessionId = sessionId;
        this.secret = secret;
        this.bytesInMetric = bytesInMetric;
        this.bytesOutMetric = bytesOutMetric;
        this.sessionMonitor = new ServerSessionMonitor(PostgresServer.SERVER_TYPE,
                                                       sessionId) {
                @Override
                public List<PreparedStatementMonitor> getPreparedStatements() {
                    List<PreparedStatementMonitor> result =
                        new ArrayList<>(preparedStatements.size());
View Full Code Here

        private Session session;
        @Override
        protected AsyncConnection newConnection(SocketChannel channel,final AsyncEndPoint endpoint)
        {
            AsyncHttpConnection conn = (AsyncHttpConnection)super.newConnection(channel, endpoint);
            ServerSessionMonitor sessionMonitor = new ServerSessionMonitor(SERVER_TYPE,
                    monitorService.allocateSessionId());

            conn.setAssociatedObject(sessionMonitor);
            this.session = sessionService.createSession();
            monitorService.registerSessionMonitor(sessionMonitor, session);
View Full Code Here

       
        @Override 
        protected void connectionClosed(Connection connection) {
            if (connection instanceof AsyncHttpConnection) {
                AsyncHttpConnection conn = (AsyncHttpConnection)connection;
                ServerSessionMonitor monitor = (ServerSessionMonitor)conn.getAssociatedObject();
                if (monitor != null) {
                    monitorService.deregisterSessionMonitor(monitor, session);
                    conn.setAssociatedObject(null);
                }
            }
View Full Code Here

        @Override
        protected AsyncConnection newConnection(SocketChannel channel,final AsyncEndPoint endpoint)
        {
            AsyncHttpConnection conn = (AsyncHttpConnection)((SslConnection)super.newConnection(channel, endpoint)).getSslEndPoint().getConnection();
            ServerSessionMonitor sessionMonitor = new ServerSessionMonitor(SERVER_TYPE,
                    monitorService.allocateSessionId());

            conn.setAssociatedObject(sessionMonitor);
            this.session = sessionService.createSession();
            monitorService.registerSessionMonitor(sessionMonitor, session);
View Full Code Here

       
        @Override 
        protected void connectionClosed (Connection connection) {
            if (connection instanceof SslConnection) {
                AsyncHttpConnection conn = (AsyncHttpConnection)((SslConnection) connection).getSslEndPoint().getConnection();
                ServerSessionMonitor monitor = (ServerSessionMonitor)conn.getAssociatedObject();
                if (monitor != null) {
                    monitorService.deregisterSessionMonitor(monitor, session);
                    conn.setAssociatedObject(null);
                }
            }
View Full Code Here

TOP

Related Classes of com.foundationdb.sql.server.ServerSessionMonitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.