ElasticsearchStorage extends zipkin2.storage.StorageComponent { @Override public boolean isOverCapacity(Throwable e) { return e instanceof RejectedExecutionException || e instanceof ResponseTimeoutException; } ElasticsearchStorage(); static Builder newBuilder(LazyHttpClient lazyHttpClient); @Nullable abstract String pipeline(); abstract boolean flushOnWrites(); abstract boolean strictTraceId(); abstract IndexNameFormatter indexNameFormatter(); abstract int namesLookback(); @Override SpanStore spanStore(); @Override Traces traces(); @Override ServiceAndSpanNames serviceAndSpanNames(); @Override AutocompleteTags autocompleteTags(); @Override SpanConsumer spanConsumer(); @Memoized float version(); void clear(); @Override boolean isOverCapacity(Throwable e); @Override CheckResult check(); @Override final String toString(); @Override void close();  }
@Test void isOverCapacity() { assertThat(storage.isOverCapacity(ResponseTimeoutException.get())).isTrue(); assertThat(storage.isOverCapacity(new RejectedExecutionException( "{\"status\":429,\"error\":{\"type\":\"es_rejected_execution_exception\"}}"))).isTrue(); assertThat(storage.isOverCapacity( new RejectedExecutionException("Rejected execution: No endpoints.", new EndpointGroupException("No endpoints")))).isTrue(); assertThat(storage.isOverCapacity(new IllegalStateException("Rejected execution"))).isFalse(); }