org.qi4j.entitystore.mongodb
Class MongoMapEntityStoreAssembler

java.lang.Object
  extended by org.qi4j.entitystore.mongodb.MongoMapEntityStoreAssembler
All Implemented Interfaces:
Assembler

public class MongoMapEntityStoreAssembler
extends java.lang.Object
implements Assembler


Constructor Summary
MongoMapEntityStoreAssembler()
           
 
Method Summary
 MongoMapEntityStoreAssembler addHostnameAndPort(java.lang.String hostname, java.lang.Integer port)
          Add a MongoDB node's hostname and port.
 void assemble(ModuleAssembly module)
          Assemblers receive a callback to the ModuleAssembly they are supposed to configure.
 MongoMapEntityStoreAssembler withCollection(java.lang.String collection)
           
 MongoMapEntityStoreAssembler withConfigModule(ModuleAssembly configModule)
           
 MongoMapEntityStoreAssembler withConfigVisibility(Visibility configVisibility)
           
 MongoMapEntityStoreAssembler withDatabase(java.lang.String database)
           
 MongoMapEntityStoreAssembler withVisibility(Visibility visibility)
           
 MongoMapEntityStoreAssembler withWriteConcern(MongoEntityStoreConfiguration.WriteConcern writeConcern)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MongoMapEntityStoreAssembler

public MongoMapEntityStoreAssembler()
Method Detail

withVisibility

public MongoMapEntityStoreAssembler withVisibility(Visibility visibility)

withConfigModule

public MongoMapEntityStoreAssembler withConfigModule(ModuleAssembly configModule)

withConfigVisibility

public MongoMapEntityStoreAssembler withConfigVisibility(Visibility configVisibility)

addHostnameAndPort

public MongoMapEntityStoreAssembler addHostnameAndPort(java.lang.String hostname,
                                                       java.lang.Integer port)
                                                throws java.net.UnknownHostException
Add a MongoDB node's hostname and port. Calling this method once disable the default behavior that use the MongoDB defaults: 127.0.0.1 27017

Throws:
java.net.UnknownHostException

withDatabase

public MongoMapEntityStoreAssembler withDatabase(java.lang.String database)

withCollection

public MongoMapEntityStoreAssembler withCollection(java.lang.String collection)

withWriteConcern

public MongoMapEntityStoreAssembler withWriteConcern(MongoEntityStoreConfiguration.WriteConcern writeConcern)

assemble

public void assemble(ModuleAssembly module)
              throws AssemblyException
Description copied from interface: Assembler
Assemblers receive a callback to the ModuleAssembly they are supposed to configure. They can use this to register objects, composites, services etc. and the additional metadata that may exist for these artifacts.

An Assembler may create new Modules by calling ModuleAssembly.layer() and then LayerAssembly.module(String) (String)}. This allows an Assembler to bootstrap an entire Layer with more Modules.

Specified by:
assemble in interface Assembler
Parameters:
module - the Module to assemble
Throws:
AssemblyException - thrown if the assembler tries to do something illegal