[
https://issues.apache.org/jira/browse/OAK-2977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14661876#comment-14661876
]
Thomas Mueller commented on OAK-2977:
-------------------------------------
Yes, we discussed we will keep the old constructor for backward compatibility,
actually it's RepositoryImpl and not OsgiRepository, so the patch for that
class is now:
{noformat}
--- src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java
(revision 1694664)
+++ src/main/java/org/apache/jackrabbit/oak/jcr/repository/RepositoryImpl.java
(working copy)
@@ -73,11 +73,6 @@
public class RepositoryImpl implements JackrabbitRepository {
/**
- * logger instance
- */
- private static final Logger log =
LoggerFactory.getLogger(RepositoryImpl.class);
-
- /**
* Name of the session attribute value determining the session refresh
* interval in seconds.
*
@@ -92,9 +87,15 @@
*/
public static final String RELAXED_LOCKING = "oak.relaxed-locking";
+ /**
+ * logger instance
+ */
+ private static final Logger log =
LoggerFactory.getLogger(RepositoryImpl.class);
+
+ protected final Whiteboard whiteboard;
+ protected final boolean fastQueryResultSize;
private final GenericDescriptors descriptors;
private final ContentRepository contentRepository;
- protected final Whiteboard whiteboard;
private final SecurityProvider securityProvider;
private final int observationQueueLength;
private final CommitRateLimiter commitRateLimiter;
@@ -120,11 +121,24 @@
private final StatisticManager statisticManager;
+ /**
+ * Constructor used for backward compatibility.
+ */
public RepositoryImpl(@Nonnull ContentRepository contentRepository,
@Nonnull Whiteboard whiteboard,
@Nonnull SecurityProvider securityProvider,
int observationQueueLength,
CommitRateLimiter commitRateLimiter) {
+ this(contentRepository, whiteboard, securityProvider,
+ observationQueueLength, commitRateLimiter, false);
+ }
+
+ public RepositoryImpl(@Nonnull ContentRepository contentRepository,
+ @Nonnull Whiteboard whiteboard,
+ @Nonnull SecurityProvider securityProvider,
+ int observationQueueLength,
+ CommitRateLimiter commitRateLimiter,
+ boolean fastQueryResultSize) {
this.contentRepository = checkNotNull(contentRepository);
this.whiteboard = checkNotNull(whiteboard);
this.securityProvider = checkNotNull(securityProvider);
@@ -134,6 +148,7 @@
this.statisticManager = new StatisticManager(whiteboard,
scheduledExecutor);
this.clock = new Clock.Fast(scheduledExecutor);
this.gcMonitorRegistration = whiteboard.register(GCMonitor.class,
gcMonitor, emptyMap());
+ this.fastQueryResultSize = fastQueryResultSize;
}
//---------------------------------------------------------< Repository
>---
@@ -322,7 +337,7 @@
Map<String, Object> attributes, SessionDelegate delegate, int
observationQueueLength,
CommitRateLimiter commitRateLimiter) {
return new SessionContext(this, statisticManager, securityProvider,
whiteboard, attributes,
- delegate, observationQueueLength, commitRateLimiter);
+ delegate, observationQueueLength, commitRateLimiter,
fastQueryResultSize);
}
/**
{noformat}
> Fast result size estimate: OSGi configuration
> ---------------------------------------------
>
> Key: OAK-2977
> URL: https://issues.apache.org/jira/browse/OAK-2977
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: query
> Reporter: Thomas Mueller
> Assignee: Thomas Mueller
> Labels: doc-impacting
> Fix For: 1.3.5
>
> Attachments: OAK-2977-b.patch, OAK-2977.patch
>
>
> The fast result size option in OAK-2926 should be configurable, for example
> over OSGi.
> The resultFetchSize should be configurable as well. Currently it is hardcoded
> (PREFETCH_MAX = 100).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)