Examples of Systemsettings


Examples of org.voltdb.catalog.Systemsettings

    private static void setSystemSettings(DeploymentType deployment,
                                          Deployment catDeployment)
    {
        // Create catalog Systemsettings
        Systemsettings syssettings =
            catDeployment.getSystemsettings().add("systemsettings");
        int temptableMaxSize = 100;
        int snapshotPriority = 6;
        int elasticDuration = 50;
        int elasticThroughput = 2;
        int queryTimeout = 0;
        if (deployment.getSystemsettings() != null)
        {
            Temptables temptables = deployment.getSystemsettings().getTemptables();
            if (temptables != null)
            {
                temptableMaxSize = temptables.getMaxsize();
            }
            SystemSettingsType.Snapshot snapshot = deployment.getSystemsettings().getSnapshot();
            if (snapshot != null) {
                snapshotPriority = snapshot.getPriority();
            }
            SystemSettingsType.Elastic elastic = deployment.getSystemsettings().getElastic();
            if (elastic != null) {
                elasticDuration = elastic.getDuration();
                elasticThroughput = elastic.getThroughput();
            }

            SystemSettingsType.Query timeout = deployment.getSystemsettings().getQuery();
            if (timeout != null)
            {
                queryTimeout = timeout.getTimeout();
            }
        }
        syssettings.setTemptablemaxsize(temptableMaxSize);
        syssettings.setSnapshotpriority(snapshotPriority);
        syssettings.setElasticduration(elasticDuration);
        syssettings.setElasticthroughput(elasticThroughput);
        syssettings.setQuerytimeout(queryTimeout);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.