Michael Miller commented on ACCUMULO-4681:

After starting to work on this task, I am now wondering if a weak ref map 
should also be created for Namespace.  This is only an issue in one part of the 
code where I had written Utils.getNextTableId() to use reflection to call the 
generic constructor of AbstractId type.  So unless I also create a 
Namespace.ID.of(namespaceId) I will have to rewrite this method to call the 
static "of" method for Table and public constructor for Namespace.

> Create WeakReference Map to replace Table.ID constructor
> --------------------------------------------------------
>                 Key: ACCUMULO-4681
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4681
>             Project: Accumulo
>          Issue Type: Improvement
>            Reporter: Michael Miller
>            Assignee: Michael Miller
>            Priority: Minor
>             Fix For: 2.0.0
> Taken from feedback on the PR #279:
> Could maybe avoid duplicates by making constructor (of Table.ID) private and 
> doing Table.ID.of(tableId), which draws from an internal WeakReference map.
> If the object deduplication in KeyExtent is still valid, this can be pushed 
> down to the Table.ID and Namespace.ID classes, replacing the optimization in 
> KeyExtent.

This message was sent by Atlassian JIRA

Reply via email to