Search in sources :

Example 6 with Whiteboard

use of org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard 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 7 with Whiteboard

use of org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard in project jackrabbit-oak by apache.

the class AbstractLoginModuleTest method testGetWhiteboardFromCallback.

@Test
public void testGetWhiteboardFromCallback() {
    AbstractLoginModule loginModule = initLoginModule(TestCredentials.class, new TestCallbackHandler(new DefaultWhiteboard()));
    Whiteboard wb = loginModule.getWhiteboard();
    assertNotNull(wb);
    // whiteboard is stored as field -> second access returns the same object
    assertSame(wb, loginModule.getWhiteboard());
}
Also used : DefaultWhiteboard(org.apache.jackrabbit.oak.spi.whiteboard.DefaultWhiteboard) Whiteboard(org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard) DefaultWhiteboard(org.apache.jackrabbit.oak.spi.whiteboard.DefaultWhiteboard) Test(org.junit.Test)

Example 8 with Whiteboard

use of org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard in project jackrabbit-oak by apache.

the class ConsolidatedListenerMBeanImpl method activate.

//~---------------------------------------< OSGi >
@Activate
private void activate(BundleContext context) {
    Whiteboard wb = new OsgiWhiteboard(context);
    mbeanReg = registerMBean(wb, ConsolidatedListenerMBean.class, this, ConsolidatedListenerMBean.TYPE, "Consolidated Event Listener statistics");
}
Also used : OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) ConsolidatedListenerMBean(org.apache.jackrabbit.oak.jcr.observation.jmx.ConsolidatedListenerMBean) Whiteboard(org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard) OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) Activate(org.apache.felix.scr.annotations.Activate)

Example 9 with Whiteboard

use of org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard 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 10 with Whiteboard

use of org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard 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)

Aggregations

Whiteboard (org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard)25 DefaultWhiteboard (org.apache.jackrabbit.oak.spi.whiteboard.DefaultWhiteboard)11 Test (org.junit.Test)10 OsgiWhiteboard (org.apache.jackrabbit.oak.osgi.OsgiWhiteboard)9 Activate (org.apache.felix.scr.annotations.Activate)7 Oak (org.apache.jackrabbit.oak.Oak)3 NodeStore (org.apache.jackrabbit.oak.spi.state.NodeStore)3 Closeable (java.io.Closeable)2 Hashtable (java.util.Hashtable)2 AtomicReference (java.util.concurrent.atomic.AtomicReference)2 Repository (javax.jcr.Repository)2 ContentRepository (org.apache.jackrabbit.oak.api.ContentRepository)2 PropertyState (org.apache.jackrabbit.oak.api.PropertyState)2 CacheStatsMBean (org.apache.jackrabbit.oak.api.jmx.CacheStatsMBean)2 Jcr (org.apache.jackrabbit.oak.jcr.Jcr)2 LongPropertyState (org.apache.jackrabbit.oak.plugins.memory.LongPropertyState)2 MemoryNodeStore (org.apache.jackrabbit.oak.plugins.memory.MemoryNodeStore)2 EditorHook (org.apache.jackrabbit.oak.spi.commit.EditorHook)2 NodeBuilder (org.apache.jackrabbit.oak.spi.state.NodeBuilder)2 BundleContext (org.osgi.framework.BundleContext)2