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

Remko Popma closed LOG4J2-1681.
-------------------------------
    Resolution: Fixed

I changed the scope of this ticket from just making the methods public in the 
implementation class to the introduction of the Indexed(ReadOnly)StringMap 
interfaces.

> Introduce interfaces IndexedStringMap and IndexedReadOnlyStringMap
> ------------------------------------------------------------------
>
>                 Key: LOG4J2-1681
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1681
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: API
>    Affects Versions: 2.7
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>             Fix For: 2.8
>
>
> This ticket proposes to introduce a public interface that imposes a total 
> ordering over the keys of a (ReadOnly)StringMap.  This interface views all 
> key-value pairs as a sequence ordered by key, and allows keys and values to 
> be accessed by their index in the sequence.
> {code}
> interface IndexedReadOnlyStringMap extends ReadOnlyStringMap {
>     String getKeyAt(final int index);
>     <V> V getValueAt(final int index);
>     int indexOfKey(final String key);
> }
> interface IndexedStringMap extends IndexedReadOnlyStringMap, StringMap {}
> {code}
> The intention is to let SortedArrayStringMap implement these interfaces. (It 
> already implements the necessary methods; the visibility of these methods 
> will change from package-protected to public.)
> These interfaces help reduce log4j's dependency on the JDK Map interface: the 
> JDK Map interface does not provide a garbage-free way to iterate over all its 
> keys or key-value pairs. 
> For example, these interfaces can be used to make MapFilter and its 
> subclasses garbage-free, and reduce allocation of temporary objects in 
> MapMessage and subclasses.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to