public synchronized HttpRemoteStore get() { if (remoteStore == null) { HttpClient httpClient = injector.getInstance(httpClientKey); StoreConfig storeConfig = injector.getInstance(storeConfigKey); remoteStore = new HttpRemoteStore( name, nodeInfo, serviceSelector, storeConfig, httpClient, monitor, mbeanExporter); remoteStore.start(); } return remoteStore; }
@PreDestroy public synchronized void shutdown() { if (remoteStore != null) { remoteStore.shutdown(); } }