package com.gofish.sentiment.storage;

import io.vertx.core.AbstractVerticle;
import io.vertx.core.Future;

/**
 * @author Luke Herron
 */
public class StorageVerticle extends AbstractVerticle {

    @Override
    public void start(Future<Void> startFuture) throws Exception {
        // WIP: storage verticle placeholder
        super.start(startFuture);
    }
}

@@ -104,95 +104,431 @@
 re;%0A
-%0A/**%0A * @author Luke Herron%0A */%0Apublic class StorageVerticle extends AbstractVerticle %7B
+import io.vertx.core.json.JsonObject;%0Aimport io.vertx.core.logging.Logger;%0Aimport io.vertx.core.logging.LoggerFactory;%0Aimport io.vertx.ext.mongo.MongoClient;%0A%0Aimport java.util.Optional;%0A%0A/**%0A * @author Luke Herron%0A */%0Apublic class StorageVerticle extends AbstractVerticle %7B%0A%0A    private static final Logger LOG = LoggerFactory.getLogger(StorageVerticle.class);%0A%0A    private JsonObject config;%0A    private MongoClient mongo;
 %0A%0A  
@@ -618,76 +618,762 @@
     
-// WIP: s
+LOG.info(%22Bringing up S
 torage
- v
+V
 erticle
- placeholder%0A        super.start(startFuture
+%22);%0A%0A        this.config = Optional.ofNullable(config())%0A                .orElseThrow(() -%3E new RuntimeException(%22Could not load storage service configuration%22));%0A%0A        // We bring up the mongo client here, even though it is utilised in the worker verticles, and not here.%0A        // This is to enable us to keep a connection open, and simply close it when this verticle closes, rather than%0A        // closing it everytime the worker verticle stops (which is after every DB call).%0A        mongo = MongoClient.createShared(vertx, config());%0A%0A        // TODO: Initialise a service proxy and publish it for service discovery%0A    %7D%0A%0A    public void stop(Future%3CVoid%3E stopFuture) throws Exception %7B%0A        mongo.close(
 );%0A 

Add mongo client to StorageVerticle