use of org.apache.jackrabbit.oak.osgi.OsgiWhiteboard in project jackrabbit-oak by apache.
the class DocumentDiscoveryLiteService method activate.
/**
* On activate the DocumentDiscoveryLiteService tries to start the
* background job
*/
@Activate
public void activate(ComponentContext context) {
logger.trace("activate: start");
// set the ClusterStateChangeListener with the DocumentNodeStore
this.documentNodeStore = (DocumentNodeStore) nodeStore;
documentNodeStore.setClusterStateChangeListener(this);
// retrieve the clusterId
clusterNodeId = documentNodeStore.getClusterId();
// start the background worker
backgroundWorker = new BackgroundWorker();
Thread th = new Thread(backgroundWorker, "DocumentDiscoveryLiteService-BackgroundWorker-[" + clusterNodeId + "]");
th.setDaemon(true);
th.start();
// register the Descriptors - for Oak to pass it upwards
if (context != null) {
OsgiWhiteboard whiteboard = new OsgiWhiteboard(context.getBundleContext());
whiteboard.register(Descriptors.class, new DiscoveryLiteDescriptor(), Collections.emptyMap());
}
logger.trace("activate: end");
}
use of org.apache.jackrabbit.oak.osgi.OsgiWhiteboard in project jackrabbit-oak by apache.
the class ConsolidatedDataStoreCacheStats method activate.
@Activate
private void activate(BundleContext context) {
Whiteboard wb = new OsgiWhiteboard(context);
List<DataStoreCacheStatsMBean> allStats = cachingDataStore.getStats();
for (DataStoreCacheStatsMBean stat : allStats) {
registrations.add(registerMBean(wb, CacheStatsMBean.class, stat, CacheStatsMBean.TYPE, stat.getName()));
cacheStats.add(stat);
}
registrations.add(registerMBean(wb, ConsolidatedDataStoreCacheStatsMBean.class, this, ConsolidatedDataStoreCacheStatsMBean.TYPE, "Consolidated DataStore Cache statistics"));
}
use of org.apache.jackrabbit.oak.osgi.OsgiWhiteboard in project jackrabbit-oak by apache.
the class BlobMigration method activate.
@Activate
private void activate(BundleContext ctx) {
Whiteboard wb = new OsgiWhiteboard(ctx);
migrator = new BlobMigrator((SplitBlobStore) splitBlobStore, nodeStore);
mbeanReg = registerMBean(wb, BlobMigrationMBean.class, this, BlobMigrationMBean.TYPE, OP_NAME);
}
use of org.apache.jackrabbit.oak.osgi.OsgiWhiteboard in project jackrabbit-oak by apache.
the class ConsolidatedCacheStats method activate.
@Activate
private void activate(BundleContext context) {
Whiteboard wb = new OsgiWhiteboard(context);
cacheStats = wb.track(CacheStatsMBean.class);
persistentCacheStats = wb.track(PersistentCacheStatsMBean.class);
mbeanReg = registerMBean(wb, ConsolidatedCacheStatsMBean.class, this, ConsolidatedCacheStatsMBean.TYPE, "Consolidated Cache statistics");
}
use of org.apache.jackrabbit.oak.osgi.OsgiWhiteboard in project jackrabbit-oak by apache.
the class S3DataStoreStats method activate.
@Activate
private void activate(BundleContext context) {
Whiteboard wb = new OsgiWhiteboard(context);
mbeanReg = registerMBean(wb, S3DataStoreStatsMBean.class, this, S3DataStoreStatsMBean.TYPE, "S3 DataStore statistics");
}
Aggregations