protected void deactivate() throws DataStoreException { if (delegateReg != null) { delegateReg.unregister(); } super.deactivate(); }
protected void activate(ComponentContext context, Map<String, Object> config) throws RepositoryException { DataStore ds = createDataStore(context, config); boolean encodeLengthInId = PropertiesUtil.toBoolean(config.get(PROP_ENCODE_LENGTH), true); int cacheSizeInMB = PropertiesUtil.toInteger(config.get(PROP_CACHE_SIZE), DataStoreBlobStore.DEFAULT_CACHE_SIZE); String homeDir = lookup(context, PROP_HOME); if (config.containsKey(PATH) && !Strings.isNullOrEmpty((String) config.get(PATH))) { log.info("Initializing the DataStore with path [{}]", config.get(PATH)); ds.init(homeDir); BlobStoreStats stats = new BlobStoreStats(getStatisticsProvider()); this.dataStore = new DataStoreBlobStore(ds, encodeLengthInId, cacheSizeInMB); this.dataStore.setBlobStatsCollector(stats); props.put(DESCRIPTION, getDescription()); if (context.getProperties().get(PROP_SPLIT_BLOBSTORE) != null) { props.put(PROP_SPLIT_BLOBSTORE, context.getProperties().get(PROP_SPLIT_BLOBSTORE)); }, dataStore , props); mbeanReg = registerMBeans(context.getBundleContext(), dataStore, stats);
protected void activate(ComponentContext context, Map<String, Object> config) throws RepositoryException { DataStore ds = createDataStore(context, config); boolean encodeLengthInId = PropertiesUtil.toBoolean(config.get(PROP_ENCODE_LENGTH), true); int cacheSizeInMB = PropertiesUtil.toInteger(config.get(PROP_CACHE_SIZE), DataStoreBlobStore.DEFAULT_CACHE_SIZE); String homeDir = lookup(context, PROP_HOME); if (config.containsKey(PATH) && !Strings.isNullOrEmpty((String) config.get(PATH))) { log.info("Initializing the DataStore with path [{}]", config.get(PATH)); ds.init(homeDir); BlobStoreStats stats = new BlobStoreStats(getStatisticsProvider()); this.dataStore = new DataStoreBlobStore(ds, encodeLengthInId, cacheSizeInMB); this.dataStore.setBlobStatsCollector(stats); props.put(DESCRIPTION, getDescription()); if (context.getProperties().get(PROP_SPLIT_BLOBSTORE) != null) { props.put(PROP_SPLIT_BLOBSTORE, context.getProperties().get(PROP_SPLIT_BLOBSTORE)); }, dataStore , props); mbeanReg = registerMBeans(context.getBundleContext(), dataStore, stats);
protected void activate(ComponentContext context, Map<String, Object> config) throws RepositoryException { DataStore ds = createDataStore(context, config); boolean encodeLengthInId = PropertiesUtil.toBoolean(config.get(PROP_ENCODE_LENGTH), true); int cacheSizeInMB = PropertiesUtil.toInteger(config.get(PROP_CACHE_SIZE), DataStoreBlobStore.DEFAULT_CACHE_SIZE); String homeDir = lookup(context, PROP_HOME); if (config.containsKey(PATH) && !Strings.isNullOrEmpty((String) config.get(PATH))) { log.info("Initializing the DataStore with path [{}]", config.get(PATH)); ds.init(homeDir); BlobStoreStats stats = new BlobStoreStats(getStatisticsProvider()); this.dataStore = new DataStoreBlobStore(ds, encodeLengthInId, cacheSizeInMB); this.dataStore.setBlobStatsCollector(stats); props.put(DESCRIPTION, getDescription()); if (context.getProperties().get(PROP_SPLIT_BLOBSTORE) != null) { props.put(PROP_SPLIT_BLOBSTORE, context.getProperties().get(PROP_SPLIT_BLOBSTORE)); }, dataStore , props); mbeanReg = registerMBeans(context.getBundleContext(), dataStore, stats);
protected void deactivate() throws DataStoreException { if (delegateReg != null) { delegateReg.unregister(); } super.deactivate(); }
protected void deactivate() throws DataStoreException { if (delegateReg != null) { delegateReg.unregister(); } super.deactivate(); }