This project has retired. For details please refer to its Attic page.
LevelDB EntityStore Starter Template for Bootstrap
Overview
javax.json serialization
javax.xml serialization
MessagePack serialization
Memory EntityStore
File EntityStore
Geode EntityStore
Hazelcast EntityStore
JClouds EntityStore
JDBM EntityStore
LevelDB EntityStore
MongoDB EntityStore
Preferences EntityStore
Redis EntityStore
Riak EntityStore
SQL EntityStore
Ehcache Cache
Memcache Cache
ElasticSearch Index/Query
OpenRDF Index/Query
Apache Solr Index/Query
SQL Index/Query
Codahale Metrics
Migration
Reindexer

LevelDB EntityStore

code

docs

tests

EntityStore service backed by a LevelDB embedded database.

LevelDB is a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

By default use the native implementation through JNI bindings and fallback to the pure Java implementation if not available on the current platform. Used implementation can be forced in the configuration.

The LevelDB EntityStore relies on the FileConfig Library to decide where it stores its database.

Table 57. Artifact

Group IDArtifact IDVersion

org.apache.polygene.extensions

org.apache.polygene.extension.entitystore-leveldb

0


Assembly

Assembly is done using the provided Assembler:

public void assemble( ModuleAssembly module )
    throws AssemblyException
{
  [...snip...]

    new LevelDBEntityStoreAssembler()
        .withConfig( config, Visibility.layer )
        .identifiedBy( "java-leveldb-entitystore" )
        .assemble( module );
          [...snip...]

}

Configuration

Here are the configuration properties for the LevelDB EntityStore:

public interface LevelDBEntityStoreConfiguration
    extends ConfigurationComposite
{

    /**
     * LevelDB flavour, can be 'java' or 'jni'.
     * By default, tries 'jni' and fallback to 'java'.
     */
    @Optional
    Property<String> flavour();

    @Optional
    Property<Integer> blockRestartInterval();

    @Optional
    Property<Integer> blockSize();

    @Optional
    Property<Long> cacheSize();

    @Optional
    Property<Boolean> compression();

    @Optional
    Property<Integer> maxOpenFiles();

    @Optional
    Property<Boolean> paranoidChecks();

    @Optional
    Property<Boolean> verifyChecksums();

    @Optional
    Property<Integer> writeBufferSize();

}

All configuration properties are defaulted to the implementation defaults meaning that you can use LevelDB EntityStore service without configuration.