Package org.neo4j.kernel.configuration

Examples of org.neo4j.kernel.configuration.Config


        Map<String, String> params = getDefaultParams();
        params.put( GraphDatabaseSettings.use_memory_mapped_buffers.name(), Settings.FALSE );
        params.put( InternalAbstractGraphDatabase.Configuration.store_dir.name(), storeDir );
        params.putAll( stringParams );

        Config config = new Config( params, GraphDatabaseSettings.class );
        boolean dump = config.get( GraphDatabaseSettings.dump_configuration );
        this.idGeneratorFactory = new DefaultIdGeneratorFactory();

        StoreFactory sf = new StoreFactory( config, idGeneratorFactory, new DefaultWindowPoolFactory(), fileSystem,
                StringLogger.DEV_NULL, null );
View Full Code Here


        }
    }

    @Test
    public void databaseConfiguredWithSpringJtaShouldUseJtaTransactionManager() throws SystemException, NotSupportedException {
        final Config config = ((GraphDatabaseAPI) gds).getDependencyResolver().resolveDependency(Config.class);
        Assert.assertEquals("spring-jta", config.getParams().get(GraphDatabaseSettings.tx_manager_impl.name()));

        JtaTransactionManager tm = ctx.getBean("transactionManager", JtaTransactionManager.class);
        Transaction transaction = tm.createTransaction("jotm", 1000);

        Assert.assertEquals(ManagedTransactionAdapter.class, transaction.getClass());
View Full Code Here

        params.put( GraphDatabaseSettings.use_memory_mapped_buffers.name(), GraphDatabaseSetting.BooleanSetting.FALSE );
        params.putAll( stringParams );
        final FileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction();

        params = new ConfigurationDefaults( GraphDatabaseSettings.class ).apply( params );
        Config config = new Config( params );
        boolean dump = config.get( GraphDatabaseSettings.dump_configuration );
        this.storeDir = storeDir;
        this.idGeneratorFactory = new DefaultIdGeneratorFactory();

        StoreFactory sf = new StoreFactory( config,idGeneratorFactory, new DefaultWindowPoolFactory(), fileSystem,
                StringLogger.DEV_NULL, null );
View Full Code Here

        parameterMap.put("com.graphaware.runtime.timing.maxDelay", "100");
        parameterMap.put("com.graphaware.runtime.timing.minDelay", "10");
        parameterMap.put("com.graphaware.runtime.timing.busyThreshold", "94");
        parameterMap.put("com.graphaware.runtime.timing.maxSamples", "201");
        parameterMap.put("com.graphaware.runtime.timing.maxTime", "2001");
        Config config = new Config(parameterMap);

        TimingStrategy expected = AdaptiveTimingStrategy
                .defaultConfiguration()
                .withBusyThreshold(94)
                .withDefaultDelayMillis(50)
View Full Code Here

    public void shouldUseValuesSpecifiedInConfig2() {
        Map<String, String> parameterMap = new HashMap<>();
        parameterMap.put("com.graphaware.runtime.timing.strategy", "fixed");
        parameterMap.put("com.graphaware.runtime.timing.initialDelay", "100");
        parameterMap.put("com.graphaware.runtime.timing.delay", "50");
        Config config = new Config(parameterMap);

        TimingStrategy expected = FixedDelayTimingStrategy
                .getInstance()
                .withDelay(50)
                .withInitialDelay(100);
View Full Code Here

    }

    @Test
    public void shouldFallBackToValueDefaultConfigurationIfValueIsNotFoundInConfig() {
        Map<String, String> parameterMap = new HashMap<>();
        Config config = new Config(parameterMap);

        TimingStrategy expected = AdaptiveTimingStrategy
                .defaultConfiguration();

        assertEquals(expected, new Neo4jConfigBasedRuntimeConfiguration(config).getTimingStrategy());
View Full Code Here

    @Test(expected = IllegalStateException.class)
    public void shouldFailWithUnknownStrategy() {
        Map<String, String> parameterMap = new HashMap<>();
        parameterMap.put("com.graphaware.runtime.timing.strategy", "unknown");
        Config config = new Config(parameterMap);

        new Neo4jConfigBasedRuntimeConfiguration(config).getTimingStrategy();
    }
View Full Code Here

TOP

Related Classes of org.neo4j.kernel.configuration.Config

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.