jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Parvulescu (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCR-3243) RepositoryStatistics should be more flexible
Date Fri, 02 Mar 2012 15:33:57 GMT

    [ https://issues.apache.org/jira/browse/JCR-3243?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13220994#comment-13220994

Alex Parvulescu commented on JCR-3243:

Good work Mete!

There is still something I believe the patch did not address yet: RepositoryStatisticsImpl
implements Iterable.
This contract implies that if I call #iterator() I'll get back all the existing entries.
I would expect that if I define a custom entry, it should still be returned in the #iterator()
call, otherwise some consumers of the api will not be able to see all the existing TimeSeries.

Another minor issue is a method in the RepositoryStatisticsImpl: private Type getType(String
I think this would be better located in the Type enum, as RepositoryStatisticsImpl doesn't
really need to deal with identifying a Type by its name.

I find it interesting that there are no unit tests in the patch. One test case could very
well be the #iterator() problem described earlier.
> RepositoryStatistics should be more flexible
> --------------------------------------------
>                 Key: JCR-3243
>                 URL: https://issues.apache.org/jira/browse/JCR-3243
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-api, jackrabbit-core
>            Reporter: Mete Atamel
>            Priority: Minor
>         Attachments: JCR-3243-2.patch, JCR-3243-3.patch, JCR-3243.patch
> Right now, Jackrabbit reports TimeSeries for things like BUNDLE_READ_COUNTER, BUNDLE_WRITE_COUNTER,
etc. but there is no way to extend Jackrabbit and report TimeSeries for additional properties.
That's because the type of TimeSeries are defined in RepositoryStatistics class as Type enum.
Enums in Java cannot be extended which limits to TimeSeries to the Types defined in RepositoryStatistics.

> I suggest that RepositoryStatistics is improved to allow additional TimeSeries. One approach
is to define an additional RepositoryStatistics#getType(String) method. 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message