Heads up, BDB coming, needed to support fast configuration
Roger Riggs
Roger.Riggs at oracle.com
Fri May 11 06:11:31 PDT 2012
Hi Chris,
Instead of synchronizing the method on the signature the synchronization
should be done internally. That will give more flexibility in the
future if the
internal data structure or interface changes without needing to change
the method signature.
Roger
On 05/11/2012 08:02 AM, Chris Hegarty wrote:
> On 11/05/12 12:45, Paul Sandoz wrote:
>> Hi Chris,
>>
>> In PersistentTreeMap:
>>
>> 131 public synchronized StringAndInt getStringAndInt(String key)
>>
>>
>> Is that mean to be synchronized? other get methods are not.
>
> In the current implementation then, yes. getStringAndInt currently
> uses String[] and int[] fields to store the retrieved values. These
> are of course class wide and can only be used by on call at a time ;-(
>
> PersistentTreeMap can be used in two ways, one instance per persistent
> on disk db shared among multiple threads, or one instance per thread.
> The former would benefit from local String[] and int[] instances, but
> the later would suffer. This will ultimately depend on how the fast
> configuration work uses PersistenTreeMap. For now, I think we should
> leave it as is, and revisit if necessary.
>
> Thanks,
> -Chris.
>
>> Paul.
>>
>> On May 10, 2012, at 4:26 PM, Chris Hegarty wrote:
>>
>>> Here is there webrev to support building of the bdb repository.
>>> http://cr.openjdk.java.net/~chegar/jigsaw/bdb_webrev.00/webrev/
>>>
>>> -Chris.
More information about the jigsaw-dev
mailing list