Hi Edoardo,

what about a single method in ClusterState
>
>     interface ClusterState {
>         public Map<String,TopicState> topicsState();
>
>     }
>
> which could return a read-only snapshot of the cluster metadata ?
>

Sure that would work too. A concern with that is that we end up allocating
a potentially rather large amount for the Map and the collections present
in the TopicStates in order to provide the snapshot. The caller might only
be interested in one item from the TopicState for one topic in the map.
Accessing this information via methods means the caller only pays for what
they use.

Cheers,

Tom

Reply via email to