Package org.apache.solr.common
Class ToleratedUpdateError
- java.lang.Object
- 
- org.apache.solr.common.ToleratedUpdateError
 
- 
 public final class ToleratedUpdateError extends Object Models the basic information related to a single "tolerated" error that occurred during updates. This class is only useful when theTolerantUpdateProcessorFactoryis used in an update processor chain
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classToleratedUpdateError.CmdTypeHelper class for dealing with SolrException metadata (String) keys
 - 
Constructor SummaryConstructors Constructor Description ToleratedUpdateError(ToleratedUpdateError.CmdType type, String id, String message)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static List<SimpleOrderedMap<String>>formatForResponseHeader(List<ToleratedUpdateError> errs)returns a list of maps of simple objects suitable for putting in a SolrQueryResponse headerstatic intgetEffectiveMaxErrors(int maxErrors)Given a 'maxErrors' value such that-1 <= maxErrors <=this method returns the original input unless it isInteger.MAX_VALUE-1in which case the effective value ofInteger.MAX_VALUEis returned.StringgetId()StringgetMessage()StringgetMetadataKey()returns a string suitable for use as a key inSolrException.setMetadata(org.apache.solr.common.util.NamedList<java.lang.String>)StringgetMetadataValue()returns a string suitable for use as a value inSolrException.setMetadata(org.apache.solr.common.util.NamedList<java.lang.String>)SimpleOrderedMap<String>getSimpleMap()returns a map of simple objects suitable for putting in a SolrQueryResponse headerToleratedUpdateError.CmdTypegetType()static intgetUserFriendlyMaxErrors(int maxErrors)Given a 'maxErrors' value such that-1 <= maxErrors <=this method returns the original input unless it isInteger.MAX_VALUEInteger.MAX_VALUEin which case-1is returned for user convinience.inthashCode()static ToleratedUpdateErrorparseMap(SimpleOrderedMap<String> data)returns a ToleratedUpdateError instance from the data in this Mapstatic ToleratedUpdateErrorparseMetadataIfToleratedUpdateError(String metadataKey, String metadataVal)returns a ToleratedUpdateError instance if this metadataKey is one we care about, else nullStringtoString()
 
- 
- 
- 
Constructor Detail- 
ToleratedUpdateErrorpublic ToleratedUpdateError(ToleratedUpdateError.CmdType type, String id, String message) 
 
- 
 - 
Method Detail- 
getEffectiveMaxErrorspublic static int getEffectiveMaxErrors(int maxErrors) Given a 'maxErrors' value such that-1 <= maxErrors <=this method returns the original input unless it isInteger.MAX_VALUE-1in which case the effective value ofInteger.MAX_VALUEis returned. Input ofmaxErrors < -1will trip an assertion and otherwise have undefined behavior.- See Also:
- getUserFriendlyMaxErrors(int)
 
 - 
getUserFriendlyMaxErrorspublic static int getUserFriendlyMaxErrors(int maxErrors) Given a 'maxErrors' value such that-1 <= maxErrors <=this method returns the original input unless it isInteger.MAX_VALUEInteger.MAX_VALUEin which case-1is returned for user convinience. Input ofmaxErrors < -1will trip an assertion and otherwise have undefined behavior.- See Also:
- getEffectiveMaxErrors(int)
 
 - 
formatForResponseHeaderpublic static List<SimpleOrderedMap<String>> formatForResponseHeader(List<ToleratedUpdateError> errs) returns a list of maps of simple objects suitable for putting in a SolrQueryResponse header
 - 
parseMappublic static ToleratedUpdateError parseMap(SimpleOrderedMap<String> data) returns a ToleratedUpdateError instance from the data in this Map- See Also:
- getSimpleMap()
 
 - 
parseMetadataIfToleratedUpdateErrorpublic static ToleratedUpdateError parseMetadataIfToleratedUpdateError(String metadataKey, String metadataVal) returns a ToleratedUpdateError instance if this metadataKey is one we care about, else null- See Also:
- getMetadataKey(),- getMetadataValue()
 
 - 
getTypepublic ToleratedUpdateError.CmdType getType() 
 - 
getIdpublic String getId() 
 - 
getMessagepublic String getMessage() 
 - 
getMetadataKeypublic String getMetadataKey() returns a string suitable for use as a key inSolrException.setMetadata(org.apache.solr.common.util.NamedList<java.lang.String>)
 - 
getMetadataValuepublic String getMetadataValue() returns a string suitable for use as a value inSolrException.setMetadata(org.apache.solr.common.util.NamedList<java.lang.String>)
 - 
getSimpleMappublic SimpleOrderedMap<String> getSimpleMap() returns a map of simple objects suitable for putting in a SolrQueryResponse header
 
- 
 
-