Search in sources :

Example 1 with Activate

use of org.apache.felix.scr.annotations.Activate in project jackrabbit-oak by apache.

the class DefaultSyncHandler method activate.

@SuppressWarnings("UnusedDeclaration")
@Activate
private void activate(Map<String, Object> properties) {
    ConfigurationParameters cfg = ConfigurationParameters.of(properties);
    config = DefaultSyncConfigImpl.of(cfg);
}
Also used : ConfigurationParameters(org.apache.jackrabbit.oak.spi.security.ConfigurationParameters) Activate(org.apache.felix.scr.annotations.Activate)

Example 2 with Activate

use of org.apache.felix.scr.annotations.Activate 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");
}
Also used : S3DataStoreStatsMBean(org.apache.jackrabbit.oak.blob.cloud.s3.stats.S3DataStoreStatsMBean) OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) Whiteboard(org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard) Activate(org.apache.felix.scr.annotations.Activate)

Example 3 with Activate

use of org.apache.felix.scr.annotations.Activate 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"));
}
Also used : ConsolidatedDataStoreCacheStatsMBean(org.apache.jackrabbit.oak.api.jmx.ConsolidatedDataStoreCacheStatsMBean) OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) ConsolidatedDataStoreCacheStatsMBean(org.apache.jackrabbit.oak.api.jmx.ConsolidatedDataStoreCacheStatsMBean) ConsolidatedDataStoreCacheStatsMBean(org.apache.jackrabbit.oak.api.jmx.ConsolidatedDataStoreCacheStatsMBean) CacheStatsMBean(org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean) Whiteboard(org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard) OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) Activate(org.apache.felix.scr.annotations.Activate)

Example 4 with Activate

use of org.apache.felix.scr.annotations.Activate 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);
}
Also used : SplitBlobStore(org.apache.jackrabbit.oak.spi.blob.split.SplitBlobStore) OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) Whiteboard(org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard) OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) Activate(org.apache.felix.scr.annotations.Activate)

Example 5 with Activate

use of org.apache.felix.scr.annotations.Activate in project jackrabbit-oak by apache.

the class DataStoreTextProviderService method activate.

@Activate
private void activate(BundleContext context, Map<String, ?> config) throws IOException {
    String dirPath = PropertiesUtil.toString(config.get(PROP_DIR), null);
    checkNotNull(dirPath, "Directory path not configured via '%s", PROP_DIR);
    File dir = new File(dirPath);
    checkArgument(dir.exists(), "Directory %s does not exist", dir.getAbsolutePath());
    textWriter = new DataStoreTextWriter(dir, true);
    reg = context.registerService(PreExtractedTextProvider.class.getName(), textWriter, null);
}
Also used : File(java.io.File) Activate(org.apache.felix.scr.annotations.Activate)

Aggregations

Activate (org.apache.felix.scr.annotations.Activate)153 ConfigurationException (org.osgi.service.cm.ConfigurationException)31 ServiceTracker (org.osgi.util.tracker.ServiceTracker)20 BundleContext (org.osgi.framework.BundleContext)19 File (java.io.File)15 OsgiWhiteboard (org.apache.jackrabbit.oak.osgi.OsgiWhiteboard)12 URL (java.net.URL)11 Hashtable (java.util.Hashtable)11 ServiceReference (org.osgi.framework.ServiceReference)11 ServiceTrackerCustomizer (org.osgi.util.tracker.ServiceTrackerCustomizer)9 HashSet (java.util.HashSet)8 IOException (java.io.IOException)7 HashMap (java.util.HashMap)7 Map (java.util.Map)6 Session (javax.jcr.Session)5 StandardMBean (javax.management.StandardMBean)5 Whiteboard (org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard)5 Filter (org.osgi.framework.Filter)5 InputStream (java.io.InputStream)4 ArrayList (java.util.ArrayList)4