kwin commented on code in PR #1144:
URL: https://github.com/apache/jackrabbit-oak/pull/1144#discussion_r1352423985
##########
oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/s3/S3DataStoreService.java:
##########
@@ -19,10 +19,23 @@
package org.apache.jackrabbit.oak.blob.cloud.s3;
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.ConfigurationPolicy;
+import org.apache.jackrabbit.oak.stats.StatisticsProvider;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
+import org.osgi.service.component.annotations.Reference;
-@Component(policy = ConfigurationPolicy.REQUIRE, name =
S3DataStoreService.NAME)
+@Component(configurationPolicy = ConfigurationPolicy.REQUIRE, name =
S3DataStoreService.NAME)
public class S3DataStoreService extends AbstractS3DataStoreService {
+ @Reference
+ private StatisticsProvider statisticsProvider;
+
public static final String NAME =
"org.apache.jackrabbit.oak.plugins.blob.datastore.S3DataStore";
+
+ protected StatisticsProvider getStatisticsProvider(){
+ return statisticsProvider;
+ }
+
+ protected void setStatisticsProvider(StatisticsProvider
statisticsProvider) {
Review Comment:
I would switch to Constructor injection here and still store the field in
the common super class. Then you can also make it final. Constructor injection
also allows to easily set it to some mock value for tests.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]