org.apache.solr.common

## Interface MapWriter

All Superinterfaces:
  MapSerializable

All Known Implementing Classes:
  AppendedSolrParams, AutoScalingConfig, AutoScalingConfig.ActionConfig, AutoScalingConfig.TriggerConfig, AutoScalingConfig.TriggerListenerConfig, BiJoinStream, CalculatorStream, CartesianProductStream, Cell, CellStream, Clause, CloudSolrStream, CollectionAdminRequest, CollectionAdminRequest.AddReplica, CollectionAdminRequest.AddReplicaProp, CollectionAdminRequest.AddRole, CollectionAdminRequest.AsyncCollectionAdminRequest, CollectionAdminRequest.AsyncCollectionSpecificAdminRequest, CollectionAdminRequest.AsyncShardSpecificAdminRequest, CollectionAdminRequest.Backup, CollectionAdminRequest.BalanceShardUnique, CollectionAdminRequest.ClusterProp, CollectionAdminRequest.ClusterStatus, CollectionAdminRequest.CollectionAdminRoleRequest, CollectionAdminRequest.CollectionProp, CollectionAdminRequest.Create, CollectionAdminRequest.CreateAlias, CollectionAdminRequest.CreateShard, CollectionAdminRequest.CreateSnapshot, CollectionAdminRequest.CreateTimeRoutedAlias, CollectionAdminRequest.Delete, CollectionAdminRequest.DeleteAlias, CollectionAdminRequest.DeleteNode, CollectionAdminRequest.DeleteReplica, CollectionAdminRequest.DeleteReplicaProp, CollectionAdminRequest.DeleteShard, CollectionAdminRequest.DeleteSnapshot, CollectionAdminRequest.DeleteStatus, CollectionAdminRequest.ForceLeader, CollectionAdminRequest.List, CollectionAdminRequest.ListAliases, CollectionAdminRequest.ListSnapshots, CollectionAdminRequest.Migrate, CollectionAdminRequest.MigrateClusterState, CollectionAdminRequest.Modify, CollectionAdminRequest.MoveReplica, CollectionAdminRequest.OverseerStatus, CollectionAdminRequest.RebalanceLeaders, CollectionAdminRequest.Reload, CollectionAdminRequest.RemoveRole, CollectionAdminRequest.ReplaceNode, CollectionAdminRequest.RequestStatus, CollectionAdminRequest.Restore, CollectionAdminRequest.SetAliasProperty, CollectionAdminRequest.ShardSpecificAdminRequest, CollectionAdminRequest.SplitShard, CollectionAdminRequest.UtilizeNode, CommitStream, ComplementStream, Condition, ConditionalMapWriter, DaemonStream, DefaultSolrParams, EchoStream, EvalStream, ExceptionStream, ExecutorStream, FacetStream, FeaturesSelectionStream, FetchStream, GatherNodesStream, GetStream, HashJoinStream, HavingStream, InnerJoinStream, IntersectStream, JDBCStream, JoinStream, KmeansEvaluator.ClusterTuple, KnnRegressionEvaluator.KnnRegressionTuple, KnnStream, LeftOuterJoinStream, LetStream, ListStream, LoessEvaluator.LoessRegressionTuple, MapSolrParams, MergeStream, ModelStream, ModifiableSolrParams, MoveReplicaSuggester, MultiMapSolrParams, NoneSuggester, NullStream, OLSRegressionEvaluator.MultipleRegressionTuple, OuterHashJoinStream, Pair, ParallelStream, PlotStream, Policy, Policy.Session, Preference, PriorityStream, PushBackStream, RandomStream, RankStream, ReducerStream, RegressionEvaluator.RegressionTuple, ReplicaInfo, RequiredSolrParams, RollupStream, Row, ScoreNodesStream, SealedClause, SelectStream, ShortestPathStream, ShuffleStream, SignificantTermsStream, SolrClientNodeStateProvider, SolrParams, SolrQuery, SolrStream, SortStream, SqlStream, StatsStream, Suggester, Suggester.SuggestionInfo, TextLogitStream, TextLogitStream.TermsStream, TimeSeriesStream, TopicStream, Tuple, TupleStream, TupStream, UniqueStream, UnsupportedSuggester, UpdateStream, V2Request, Violation

    public interface MapWriter
    extends MapSerializable

Use this class to push all entries of a Map into an output. This avoids creating map instances and is supposed to be memory efficient. If the entries are primitives, unnecessary boxing is also avoided.

### Nested Class Summary

Nested Classes
`static interface` `MapWriter.EntryWriter` An interface to push one entry at a time to the output.

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default String` `jsonStr()`
`default Map` `toMap(Map<String,Object> map)` Use the passed map to minimize object creation.
`void` `writeMap(MapWriter.EntryWriter ew)`

### Method Detail

#### jsonStr

    default String jsonStr()

#### toMap

    default Map toMap(Map<String,Object> map)

Description copied from interface: `MapSerializable`
Use the passed map to minimize object creation. Do not keep a reference to the passed map and reuse it. it may be reused by the framework

Specified by:
  `toMap` in interface `MapSerializable`

#### writeMap

    void writeMap(MapWriter.EntryWriter ew)
           throws IOException

Throws:
  `IOException`