diff --git oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java index 6b274e0..f637c16 100644 --- oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java +++ oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreService.java @@ -255,7 +255,6 @@ public class SegmentNodeStoreService extends ProxyNodeStore "considered for GC" ) public static final String PROP_BLOB_GC_MAX_AGE = "blobGcMaxAgeInSecs"; - private long blobGcMaxAgeInSecs = DEFAULT_BLOB_GC_MAX_AGE; @Override protected synchronized SegmentNodeStore getNodeStore() { @@ -264,10 +263,9 @@ public class SegmentNodeStoreService extends ProxyNodeStore } @Activate - private void activate(ComponentContext context, Map config) throws IOException { + private void activate(ComponentContext context) throws IOException { this.context = context; this.customBlobStore = Boolean.parseBoolean(lookup(context, CUSTOM_BLOB_STORE)); - modified(config); if (blobStore == null && customBlobStore) { log.info("BlobStore use enabled. SegmentNodeStore would be initialized when BlobStore would be available"); @@ -407,6 +405,8 @@ public class SegmentNodeStoreService extends ProxyNodeStore } } + final long blobGcMaxAgeInSecs = toLong(lookup(context, PROP_BLOB_GC_MAX_AGE), DEFAULT_BLOB_GC_MAX_AGE); + if (store.getBlobStore() instanceof GarbageCollectableBlobStore) { BlobGarbageCollector gc = new BlobGarbageCollector() { @Override @@ -444,14 +444,6 @@ public class SegmentNodeStoreService extends ProxyNodeStore return null; } - /** - * At runtime SegmentNodeStore only picks up modification of certain properties - */ - @Modified - protected void modified(Map config){ - blobGcMaxAgeInSecs = toLong(config.get(PROP_BLOB_GC_MAX_AGE), DEFAULT_BLOB_GC_MAX_AGE); - } - @Deactivate public synchronized void deactivate() { unregisterNodeStore();