Package org.iq80.leveldb

Examples of org.iq80.leveldb.DBFactory.open()


            options.writeBufferSize( config.writeBufferSize().get() );
        }

        // Open/Create the database
        File dbFile = new File( fileConfig.dataDirectory(), descriptor.identity() );
        db = factory.open( dbFile, options );
    }

    /**
     * Tries in order: JNI and then pure Java LevelDB implementations.
     */
 
View Full Code Here


            Options options = new Options();

            options.createIfMissing(true);

            DB db = factory.open(new File(aDirectoryPath), options);

            return db;

        } catch (Throwable t) {
            throw new IllegalStateException(
View Full Code Here

            Options options = new Options();

            options.createIfMissing(true);

            this.setDatabase(factory.open(new File(aDirectoryPath), options));

            if (!this.cacheJournalSequence()) {
                this.repair();
            }
View Full Code Here

            Options options = new Options();

            options.createIfMissing(true);

            this.setDatabase(factory.open(new File(aDirectoryPath), options));

            if (!this.cacheJournalSequence()) {
                this.repair();
            }
View Full Code Here

            Options options = new Options();

            options.createIfMissing(true);

            DB db = factory.open(new File(aDirectoryPath), options);

            return db;

        } catch (Throwable t) {
            throw new IllegalStateException(
View Full Code Here

                .cacheSize(NODE_STATE_CACHE_SIZE)
                ;
       
        DB nodeStateDB;
        try {
            nodeStateDB = factory.open(nodeStateDir, options);
        } catch (IOException e) {
            throw new IllegalStateException("Failed to open Node state LevelDB: "+e.getMessage(), e);
        }
        return new LevelDBNodeStateStore<K,V>(null, keyConv, valueConv, nodeStateDB);
    }
View Full Code Here

                .cacheSize(NODE_STATE_CACHE_SIZE)
                ;
       
        DB nodeStateDB;
        try {
            nodeStateDB = factory.open(nodeStateDir, options);
        } catch (IOException e) {
            throw new IllegalStateException("Failed to open Remote Node state LevelDB (id '"+secondaryId
                    +"'): "+e.getMessage(), e);
        }
        return new LevelDBNodeStateStore<K,V>(null, keyConv, valueConv, nodeStateDB);
View Full Code Here

                ;
       
        DB dataDB;
        try {
            options = options.cacheSize(_levelDBConfig.dataCacheSize.getNumberOfBytes());
            dataDB = factory.open(dataDir, options);
        } catch (IOException e) {
            throw new IllegalStateException("Failed to open main data LevelDB: "+e.getMessage(), e);
        }
        DB indexDB;
        try {
View Full Code Here

            throw new IllegalStateException("Failed to open main data LevelDB: "+e.getMessage(), e);
        }
        DB indexDB;
        try {
            options = options.cacheSize(_levelDBConfig.dataCacheSize.getNumberOfBytes());
            indexDB = factory.open(lastModDir, options);
        } catch (IOException e) {
            throw new IllegalStateException("Failed to open last-mod index LevelDB: "+e.getMessage(), e);
        }
        return new LevelDBStoreBackend(storableConv, dbRoot, dataDB, indexDB);
    }
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.