Example #1
0
 private RocksService getNodeClient() throws Exception {
   if (nodeClient.get() == null) {
     try {
       nodeClient.set(
           clientManager
               .createClient(
                   new FramedClientConnector(fromParts(hostNodes, portNodes)), RocksService.class)
               .get());
       logger.info("Opened node Rocksdb connection to " + hostNodes + ":" + portNodes);
     } catch (Exception e) {
       logger.error("Error in open node! Host " + hostNodes + " port ++" + portNodes + " " + e);
       throw e;
     }
   }
   return nodeClient.get();
 }