public final class ToleratedUpdateError extends Object
TolerantUpdateProcessorFactory
is used in an update
processor chainModifier and Type | Class and Description |
---|---|
static class |
ToleratedUpdateError.CmdType
Helper class for dealing with SolrException metadata (String) keys
|
Constructor and Description |
---|
ToleratedUpdateError(ToleratedUpdateError.CmdType type,
String id,
String message) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static List<SimpleOrderedMap<String>> |
formatForResponseHeader(List<ToleratedUpdateError> errs)
returns a list of maps of simple objects suitable for putting in a SolrQueryResponse header
|
static int |
getEffectiveMaxErrors(int maxErrors)
Given a 'maxErrors' value such that
-1 <= maxErrors <=
this method returns the original input unless it is -1 in which case the effective value of
Integer.MAX_VALUE is returned. |
String |
getId() |
String |
getMessage() |
String |
getMetadataKey()
returns a string suitable for use as a key in
SolrException.setMetadata(org.apache.solr.common.util.NamedList<java.lang.String>) |
String |
getMetadataValue()
returns a string suitable for use as a value in
SolrException.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 header
|
ToleratedUpdateError.CmdType |
getType() |
static int |
getUserFriendlyMaxErrors(int maxErrors)
Given a 'maxErrors' value such that
-1 <= maxErrors <=
this method returns the original input unless it is Integer.MAX_VALUE in which case
-1 is returned for user convinience. |
int |
hashCode() |
static ToleratedUpdateError |
parseMap(SimpleOrderedMap<String> data)
returns a ToleratedUpdateError instance from the data in this Map
|
static ToleratedUpdateError |
parseMetadataIfToleratedUpdateError(String metadataKey,
String metadataVal)
returns a ToleratedUpdateError instance if this metadataKey is one we care about, else null
|
String |
toString() |
public ToleratedUpdateError(ToleratedUpdateError.CmdType type, String id, String message)
public static int getEffectiveMaxErrors(int maxErrors)
-1 <= maxErrors <= Integer.MAX_VALUE
this method returns the original input unless it is -1
in which case the effective value of
Integer.MAX_VALUE
is returned.
Input of maxErrors < -1
will trip an assertion and otherwise have undefined behavior.getUserFriendlyMaxErrors(int)
public static int getUserFriendlyMaxErrors(int maxErrors)
-1 <= maxErrors <= Integer.MAX_VALUE
this method returns the original input unless it is Integer.MAX_VALUE
in which case
-1
is returned for user convinience.
Input of maxErrors < -1
will trip an assertion and otherwise have undefined behavior.getEffectiveMaxErrors(int)
public static List<SimpleOrderedMap<String>> formatForResponseHeader(List<ToleratedUpdateError> errs)
public static ToleratedUpdateError parseMap(SimpleOrderedMap<String> data)
getSimpleMap()
public static ToleratedUpdateError parseMetadataIfToleratedUpdateError(String metadataKey, String metadataVal)
getMetadataKey()
,
getMetadataValue()
public ToleratedUpdateError.CmdType getType()
public String getId()
public String getMessage()
public String getMetadataKey()
SolrException.setMetadata(org.apache.solr.common.util.NamedList<java.lang.String>)
public String getMetadataValue()
SolrException.setMetadata(org.apache.solr.common.util.NamedList<java.lang.String>)
public SimpleOrderedMap<String> getSimpleMap()
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.