Package com.foundationdb.sql.server

Examples of com.foundationdb.sql.server.ServerQueryContext


{
    private SQLJJarRoutines() {
    }

    public static void install(String url, String jar, long deploy) {
        ServerQueryContext context = ServerCallContextStack.getCallingContext();
        ServerSession server = context.getServer();
        TableName jarName = jarName(server, jar);
        DDLFunctions ddl = server.getDXL().ddlFunctions();
        NewAISBuilder aisb = AISBBasedBuilder.create(server.getDefaultSchemaName(),
                                                     ddl.getTypesTranslator());
        aisb.sqljJar(jarName).url(url, true);
View Full Code Here


            new SQLJJarDeployer(context, jarName).deploy();
        }
    }

    public static void replace(String url, String jar) {
        ServerQueryContext context = ServerCallContextStack.getCallingContext();
        ServerSession server = context.getServer();
        TableName jarName = jarName(server, jar);
        DDLFunctions ddl = server.getDXL().ddlFunctions();
        NewAISBuilder aisb = AISBBasedBuilder.create(server.getDefaultSchemaName(),
                                                     ddl.getTypesTranslator());
        aisb.sqljJar(jarName).url(url, true);
View Full Code Here

        ddl.replaceSQLJJar(server.getSession(), sqljJar);
        server.getRoutineLoader().checkUnloadSQLJJar(server.getSession(), jarName);
    }

    public static void remove(String jar, long undeploy) {
        ServerQueryContext context = ServerCallContextStack.getCallingContext();
        ServerSession server = context.getServer();
        TableName jarName = jarName(server, jar);
        DDLFunctions ddl = server.getDXL().ddlFunctions();
        if (undeploy != 0) {
            new SQLJJarDeployer(context, jarName).undeploy();
        }
View Full Code Here

    }

    // TODO: Temporary way of accessing these via stored procedures.
    public static class Routines {
        public static void addRole(String roleName) {
            ServerQueryContext context = ServerCallContextStack.getCallingContext();
            SecurityService service = context.getServer().getSecurityService();
            service.addRole(roleName);
        }
View Full Code Here

            SecurityService service = context.getServer().getSecurityService();
            service.addRole(roleName);
        }

        public static void addUser(String userName, String password, String roles) {
            ServerQueryContext context = ServerCallContextStack.getCallingContext();
            SecurityService service = context.getServer().getSecurityService();
            service.addUser(userName, password, Arrays.asList(roles.split(",")));
        }
View Full Code Here

    }

    @SuppressWarnings("unused") // Called reflectively
    public static class Routines {
        public static void backgroundWait() {
            ServerQueryContext context = ServerCallContextStack.getCallingContext();
            FullTextIndexService ft = context.getServer().getServiceManager().getServiceByClass(FullTextIndexService.class);
            ft.backgroundWait();
        }
View Full Code Here

    private IndexStatisticsRoutines() {
    }

    private static IndexStatisticsService indexService() {
        ServerQueryContext context = ServerCallContextStack.getCallingContext();
        return context.getServer().getServiceManager().getServiceByClass(IndexStatisticsService.class);
    }
View Full Code Here

        ServerQueryContext context = ServerCallContextStack.getCallingContext();
        return context.getServer().getServiceManager().getServiceByClass(IndexStatisticsService.class);
    }

    private static Session session() {
        ServerQueryContext context = ServerCallContextStack.getCallingContext();
        return context.getServer().getSession();
    }
View Full Code Here

        ServerQueryContext context = ServerCallContextStack.getCallingContext();
        return context.getServer().getSession();
    }

    private static TransactionService txnService() {
        ServerQueryContext context = ServerCallContextStack.getCallingContext();
        return context.getServer().getTransactionService();
    }
View Full Code Here

        public static void resetTaps(String tapNames) {
          getService().reset(tapNames);
        }
       
        private static StatisticsService getService() {
            ServerQueryContext context = ServerCallContextStack.getCallingContext();
            return context.getServiceManager().getStatisticsService();
        }
View Full Code Here

TOP

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

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.