private void startStorageAdapter ( ) throws Exception { // create the storage adapter that will write our metrics/inventory data to backend storage on server this . storageAdapter = new HawkularStorageAdapter ( ) ; this . storageAdapter . initialize ( feedId , configuration . getStorageAdapter ( ) , diagnostics , httpClientBuilder ) ; // provide our storage adapter to the proxies - allows external apps to use them to store its own data inventoryStorageProxy . setStorageAdapter ( storageAdapter ) ; // log our own diagnostic reports this . diagnosticsReporter = JBossLoggingReporter . forRegistry ( this . diagnostics . getMetricRegistry ( ) ) . convertRatesTo ( TimeUnit . SECONDS ) . convertDurationsTo ( TimeUnit . MILLISECONDS ) . outputTo ( Logger . getLogger ( getClass ( ) ) ) . withLoggingLevel ( LoggingLevel . DEBUG ) . build ( ) ; if ( this . configuration . getDiagnostics ( ) . isEnabled ( ) ) { diagnosticsReporter . start ( this . configuration . getDiagnostics ( ) . getInterval ( ) , this . configuration . getDiagnostics ( ) . getTimeUnits ( ) ) ; } }
Creates and starts the storage adapter that will be used to store our inventory data and monitoring data .