public void execute(Runnable command) {
threadPool.execute(command);
}
}, new Hashtable<String, Object>());
final Oak oak = new Oak(nodeStore)
.with(new InitialContent())
.with(new ExtraSlingContent())
.with(JcrConflictHandler.JCR_CONFLICT_HANDLER)
.with(new EditorHook(new VersionEditorProvider()))
.with(securityProvider)
.with(new NameValidatorProvider())
.with(new NamespaceEditorProvider())
.with(new TypeEditorProvider())
// .with(new RegistrationEditorProvider())
.with(new ConflictValidatorProvider())
// index stuff
.with(indexProvider)
.with(indexEditorProvider)
// .with(new PropertyIndexEditorProvider())
// .with(new PropertyIndexProvider())
// .with(new NodeTypeIndexProvider())
// .with(new LuceneIndexEditorProvider())
.with(AggregateIndexProvider.wrap(new LuceneIndexProvider()
.with(getNodeAggregator())))
.with(getDefaultWorkspace())
.withAsyncIndexing()
.with(whiteboard)
;
if (commitRateLimiter != null) {
oak.with(commitRateLimiter);
}
final ContentRepository contentRepository = oak.createContentRepository();
return new JcrRepositoryHacks(contentRepository, whiteboard, securityProvider, observationQueueLength, commitRateLimiter);
}