private static void addHeadersToException(ElasticsearchException exception, String processorType, String processorTag, String propertyName) { if (processorType != null) { exception.addHeader("processor_type", processorType); } if (processorTag != null) { exception.addHeader("processor_tag", processorTag); } if (propertyName != null) { exception.addHeader("property_name", propertyName); } }
/** * Adds a new header with the given key. * This method will replace existing header if a header with the same key already exists */ public void addHeader(String key, String... value) { addHeader(key, Arrays.asList(value)); }
private ElasticsearchException newCompoundProcessorException(Exception e, String processorType, String processorTag) { if (e instanceof ElasticsearchException && ((ElasticsearchException) e).getHeader("processor_type") != null) { return (ElasticsearchException) e; } ElasticsearchException exception = new ElasticsearchException(new IllegalArgumentException(e)); if (processorType != null) { exception.addHeader("processor_type", processorType); } if (processorTag != null) { exception.addHeader("processor_tag", processorTag); } return exception; } }
e.addHeader(header.getKey(), header.getValue());
private static void addHeadersToException(ElasticsearchException exception, String processorType, String processorTag, String propertyName) { if (processorType != null) { exception.addHeader("processor_type", processorType); } if (processorTag != null) { exception.addHeader("processor_tag", processorTag); } if (propertyName != null) { exception.addHeader("property_name", propertyName); } }
private static void addHeadersToException(ElasticsearchException exception, String processorType, String processorTag, String propertyName) { if (processorType != null) { exception.addHeader("processor_type", processorType); } if (processorTag != null) { exception.addHeader("processor_tag", processorTag); } if (propertyName != null) { exception.addHeader("property_name", propertyName); } }
private static void addHeadersToException(ElasticsearchException exception, String processorType, String processorTag, String propertyName) { if (processorType != null) { exception.addHeader("processor_type", processorType); } if (processorTag != null) { exception.addHeader("processor_tag", processorTag); } if (propertyName != null) { exception.addHeader("property_name", propertyName); } }
public void setIndex(String index) { if (index != null) { addHeader(INDEX_HEADER_KEY, index); } }
/** * Adds a new header with the given key. * This method will replace existing header if a header with the same key already exists */ public void addHeader(String key, String... value) { addHeader(key, Arrays.asList(value)); }
/** * Adds a new header with the given key. * This method will replace existing header if a header with the same key already exists */ public void addHeader(String key, String... value) { addHeader(key, Arrays.asList(value)); }
/** * Adds a new header with the given key. * This method will replace existing header if a header with the same key already exists */ public void addHeader(String key, String... value) { addHeader(key, Arrays.asList(value)); }
public void setIndex(Index index) { if (index != null) { addHeader(INDEX_HEADER_KEY, index.getName()); } }
private ElasticsearchException newCompoundProcessorException(Exception e, String processorType, String processorTag) { if (e instanceof ElasticsearchException && ((ElasticsearchException) e).getHeader("processor_type") != null) { return (ElasticsearchException) e; } ElasticsearchException exception = new ElasticsearchException(new IllegalArgumentException(e)); if (processorType != null) { exception.addHeader("processor_type", processorType); } if (processorTag != null) { exception.addHeader("processor_tag", processorTag); } return exception; } }
private ElasticsearchException newCompoundProcessorException(Exception e, String processorType, String processorTag) { if (e instanceof ElasticsearchException && ((ElasticsearchException)e).getHeader("processor_type") != null) { return (ElasticsearchException) e; } ElasticsearchException exception = new ElasticsearchException(new IllegalArgumentException(e)); if (processorType != null) { exception.addHeader("processor_type", processorType); } if (processorTag != null) { exception.addHeader("processor_tag", processorTag); } return exception; } }
e.addHeader(header.getKey(), header.getValue());
e.addHeader(header.getKey(), header.getValue());
e.addHeader(header.getKey(), header.getValue());