beam-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jingsong Lee (JIRA)" <>
Subject [jira] [Commented] (BEAM-42) State for "Map" data, supporting efficient key lookup, etc.
Date Wed, 08 Feb 2017 04:02:41 GMT


Jingsong Lee commented on BEAM-42:

MapState maybe need more "sighted write"(contrary to "blind write"). There are also interfaces
to be discussed.
 * An object that maps keys to values.
 * A map cannot contain duplicate keys;
 * each key can map to at most one value.
 * @param <K> the type of keys maintained by this map
 * @param <V> the type of mapped values
public interface MapState<K, V> extends ReadableState<Iterator<Map.Entry<K,
V>>>, State {

  V get(K key);

  void put(K key, V value);

  V putIfAbsent(K key, V value);

  void remove(K key);

  Iterable<K> keys();

  Iterable<V> values();

  MapState<K, V> readLater();

> State for "Map" data, supporting efficient key lookup, etc.
> -----------------------------------------------------------
>                 Key: BEAM-42
>                 URL:
>             Project: Beam
>          Issue Type: New Feature
>          Components: beam-model
>            Reporter: Kenneth Knowles
>            Assignee: Kenneth Knowles
>            Priority: Minor
>              Labels: State
> Analogous to BagState's blind writes, and SetState's efficient membership check, MapState
would add efficient key lookup and mutation, and other Map-related operations.

This message was sent by Atlassian JIRA

View raw message