01: package org.terracotta.modules.lucene_2_0_0;
02:
03: import org.osgi.framework.BundleContext;
04: import org.terracotta.modules.configuration.TerracottaConfiguratorModule;
05:
06: public class LuceneTerracottaConfigurator extends
07: TerracottaConfiguratorModule {
08:
09: protected final void addInstrumentation(final BundleContext context) {
10: configHelper.getOrCreateSpec("org.apache.lucene.store.RAMFile")
11: .setCustomClassAdapter(new RAMFileAdapter());
12:
13: configHelper.addCustomAdapter(
14: "org.apache.lucene.store.RAMOutputStream",
15: new RAMFileExternalAccessAdatper());
16: configHelper.addCustomAdapter(
17: "org.apache.lucene.store.RAMInputStream",
18: new RAMFileExternalAccessAdatper());
19:
20: configHelper.addCustomAdapter(
21: "org.apache.lucene.store.RAMDirectory$1",
22: new RAMDirectoryLockAdapter());
23:
24: configHelper.getOrCreateSpec(
25: "org.apache.lucene.store.RAMDirectory")
26: .setCustomClassAdapter(
27: new RAMFileExternalAccessAdatper());
28: }
29:
30: }
|