accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-4681) Create WeakReference Map to replace Table.ID constructor
Date Tue, 08 Aug 2017 20:01:00 GMT


Christopher Tubbs commented on ACCUMULO-4681:

Having a static "of" method on both seems useful to me. I'd probably drop the reflection,
though, and simply provide two instances of the "getNext(Table|Namespace)Id", which share
a common implementation. Or... just use it like {{Table.ID.of(Utils.getNextId())}} and {{Namespace.ID.of(Utils.getNextId())}}.

> Create WeakReference Map to replace Table.ID constructor
> --------------------------------------------------------
>                 Key: ACCUMULO-4681
>                 URL:
>             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

View raw message