Package org.apache.solr.cluster.api
Interface SimpleMap<T>
- 
- All Superinterfaces:
- MapSerializable,- MapWriter,- NavigableObject
 - All Known Implementing Classes:
- CloudSolrClient.RouteResponse,- NamedList,- SimpleOrderedMap,- SimpleZkMap,- WrappedSimpleMap
 
 public interface SimpleMap<T> extends MapWriter A simplified read-only key-value structure. It is designed to support large datasets without consuming lot of memory The objective is to provide implementations that are cheap and memory efficient to implement and consume. The keys are alwaysCharSequenceobjects, The values can be of any type
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriterMapWriter.EntryWriter
 
- 
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidabortableForEach(BiFunction<String,? super T,Boolean> fun)Navigate through all key-values but abort in between if required.default voidabortableForEachKey(Function<String,Boolean> fun)iterate through all keys but abort in between if required The default impl is suboptimal.default Map<String,T>asMap()default Map<String,T>asMap(Map<String,T> sink)voidforEachEntry(BiConsumer<String,? super T> fun)Navigate through all keys and valuesdefault voidforEachKey(Consumer<String> fun)iterate through all keys The default impl is suboptimal.Tget(String key)get a value by key.default Tget(String key, T def)intsize()default voidwriteMap(MapWriter.EntryWriter ew)- 
Methods inherited from interface org.apache.solr.common.NavigableObject_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr, _size
 
- 
 
- 
- 
- 
Method Detail- 
forEachEntryvoid forEachEntry(BiConsumer<String,? super T> fun) Navigate through all keys and values
 - 
forEachKeydefault void forEachKey(Consumer<String> fun) iterate through all keys The default impl is suboptimal. Proper implementations must do it more efficiently
 - 
sizeint size() 
 - 
abortableForEachKeydefault void abortableForEachKey(Function<String,Boolean> fun) iterate through all keys but abort in between if required The default impl is suboptimal. Proper implementations must do it more efficiently- Parameters:
- fun- Consume each key and return a boolean to signal whether to proceed or not. If true, continue. If false stop
 
 - 
abortableForEachdefault void abortableForEach(BiFunction<String,? super T,Boolean> fun) Navigate through all key-values but abort in between if required. The default impl is suboptimal. Proper implementations must do it more efficiently- Parameters:
- fun- Consume each entry and return a boolean to signal whether to proceed or not. If true, continue, if false stop
 
 - 
writeMapdefault void writeMap(MapWriter.EntryWriter ew) throws IOException - Specified by:
- writeMapin interface- MapWriter
- Throws:
- IOException
 
 
- 
 
-