Package org.neo4j.kernel.impl.nioneo.store

Examples of org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction


        rejectAutoUpgrade( stringParams );
        msgLog = StringLogger.logger( storeDir );
        Map<String,String> params = getDefaultParams();
        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;
View Full Code Here


        };
    }
   
    public static FileSystemAbstraction defaultFileSystemAbstraction()
    {
        return new FileSystemAbstraction()
        {
            @Override
            public FileChannel open( String fileName, String mode ) throws IOException
            {
                return new RandomAccessFile( fileName, mode ).getChannel();
View Full Code Here

    @Test
    public void testOffsettedFileChannel() throws Exception
    {
        String fileName = "target/var/neostore.nodestore.db";
        deleteFileOrDirectory( fileName );
        FileSystemAbstraction offsettedFileSystem = new JumpingFileSystemAbstraction( 10 );
        IdGenerator idGenerator = new JumpingIdGeneratorFactory( 10 ).get( IdType.NODE );
        JumpingFileChannel channel = (JumpingFileChannel) offsettedFileSystem.open( fileName, "rw" );
       
        for ( int i = 0; i < 16; i++ )
        {
            writeSomethingLikeNodeRecord( channel, idGenerator.nextId(), i );
        }
       
        channel.close();
        channel = (JumpingFileChannel) offsettedFileSystem.open( fileName, "rw" );
        idGenerator = new JumpingIdGeneratorFactory( 10 ).get( IdType.NODE );
       
        for ( int i = 0; i < 16; i++ )
        {
            assertEquals( i, readSomethingLikeNodeRecord( channel, idGenerator.nextId() ) );
View Full Code Here

TOP

Related Classes of org.neo4j.kernel.impl.nioneo.store.FileSystemAbstraction

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.