[ 
https://issues.apache.org/jira/browse/GEODE-6850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Darrel Schneider updated GEODE-6850:
------------------------------------
    Description: 
The "int" methods on the statistics interfaces have been deprecated.
The implementation of these deprecated "int" methods now use the "long" methods.
The only place this could be visible to a user is if they call 
Statistics.get(String) or Statistics.get(StatisticDescriptor). Both of these 
methods return a "Number" instance.
These methods continue to do this and existing code will work fine if it does 
not try to downcast the Number to a subclass. But for "int" stats, these 
methods used to return an "Integer" instance and now return a "Long" instance.


  was:
The current Statistics interface allows stats to be identified with ids of type 
"int". Currently the first stat that is an 32-bit IntCounter or IntGauge will 
have an "id" of 0. The same is true of the first 64-bit LongCounter or 
LongGauge. They both end up with the same id. If you accidently use the id of a 
64-bit stat in a api that looks it up as an 32-bit int, then it will be looking 
at a different stat (the first 32-bit stat instead of the first 64-bit stat).
This overloading of ids becomes even more of a problem when we want to change 
one from 32-bit to 64-bit.
So instead of overloading ids, the internal implementation should be changed so 
that each id is unique. I given stat's id should not be used for any other 
32-bit or 64-bit stat.


> Deprecate "int" statistics in favor of "long" statistics
> --------------------------------------------------------
>
>                 Key: GEODE-6850
>                 URL: https://issues.apache.org/jira/browse/GEODE-6850
>             Project: Geode
>          Issue Type: Improvement
>          Components: statistics
>            Reporter: Darrel Schneider
>            Assignee: Darrel Schneider
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> The "int" methods on the statistics interfaces have been deprecated.
> The implementation of these deprecated "int" methods now use the "long" 
> methods.
> The only place this could be visible to a user is if they call 
> Statistics.get(String) or Statistics.get(StatisticDescriptor). Both of these 
> methods return a "Number" instance.
> These methods continue to do this and existing code will work fine if it does 
> not try to downcast the Number to a subclass. But for "int" stats, these 
> methods used to return an "Integer" instance and now return a "Long" instance.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to