congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NotSerializableExceptionWrapper
Code IndexAdd Tabnine to your IDE (free)

How to use
NotSerializableExceptionWrapper
in
org.elasticsearch.common.io.stream

Best Java code snippets using org.elasticsearch.common.io.stream.NotSerializableExceptionWrapper (Showing top 16 results out of 315)

origin: org.elasticsearch/elasticsearch

  private void handleUpdateFailureWithRetry(final ActionListener<UpdateResponse> listener, final UpdateRequest request,
                       final Exception failure, int retryCount) {
    final Throwable cause = unwrapCause(failure);
    if (cause instanceof VersionConflictEngineException) {
      if (retryCount < request.retryOnConflict()) {
        logger.trace("Retry attempt [{}] of [{}] on version conflict on [{}][{}][{}]",
            retryCount + 1, request.retryOnConflict(), request.index(), request.getShardId(), request.id());
        threadPool.executor(executor()).execute(new ActionRunnable<UpdateResponse>(listener) {
          @Override
          protected void doRun() {
            shardOperation(request, listener, retryCount + 1);
          }
        });
        return;
      }
    }
    listener.onFailure(cause instanceof Exception ? (Exception) cause : new NotSerializableExceptionWrapper(cause));
  }
}
origin: org.elasticsearch/elasticsearch

public NotSerializableExceptionWrapper(Throwable other) {
  super(ElasticsearchException.getExceptionName(other) + ": " + other.getMessage(), other.getCause());
  this.name = ElasticsearchException.getExceptionName(other);
  this.status = ExceptionsHelper.status(other);
  setStackTrace(other.getStackTrace());
  for (Throwable otherSuppressed : other.getSuppressed()) {
    addSuppressed(otherSuppressed);
  }
  if (other instanceof ElasticsearchException) {
    ElasticsearchException ex = (ElasticsearchException) other;
    for (String key : ex.getHeaderKeys()) {
      this.addHeader(key, ex.getHeader(key));
    }
    for (String key : ex.getMetadataKeys()) {
      this.addMetadata(key, ex.getMetadata(key));
    }
  }
}
origin: harbby/presto-connectors

public NotSerializableExceptionWrapper(Throwable other) {
  super(ElasticsearchException.getExceptionName(other) +
          ": " + other.getMessage(), other.getCause());
  this.name = ElasticsearchException.getExceptionName(other);
  this.status = ExceptionsHelper.status(other);
  setStackTrace(other.getStackTrace());
  for (Throwable otherSuppressed : other.getSuppressed()) {
    addSuppressed(otherSuppressed);
  }
  if (other instanceof ElasticsearchException) {
    ElasticsearchException ex = (ElasticsearchException) other;
    for (String key : ex.getHeaderKeys()) {
      this.addHeader(key, ex.getHeader(key));
    }
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

public NotSerializableExceptionWrapper(Throwable other) {
  super(ElasticsearchException.getExceptionName(other) + ": " + other.getMessage(), other.getCause());
  this.name = ElasticsearchException.getExceptionName(other);
  this.status = ExceptionsHelper.status(other);
  setStackTrace(other.getStackTrace());
  for (Throwable otherSuppressed : other.getSuppressed()) {
    addSuppressed(otherSuppressed);
  }
  if (other instanceof ElasticsearchException) {
    ElasticsearchException ex = (ElasticsearchException) other;
    for (String key : ex.getHeaderKeys()) {
      this.addHeader(key, ex.getHeader(key));
    }
    for (String key : ex.getMetadataKeys()) {
      this.addMetadata(key, ex.getMetadata(key));
    }
  }
}
origin: org.elasticsearch/elasticsearch

  ex = (ElasticsearchException) throwable;
} else {
  ex = new NotSerializableExceptionWrapper(throwable);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

public NotSerializableExceptionWrapper(Throwable other) {
  super(ElasticsearchException.getExceptionName(other) + ": " + other.getMessage(), other.getCause());
  this.name = ElasticsearchException.getExceptionName(other);
  this.status = ExceptionsHelper.status(other);
  setStackTrace(other.getStackTrace());
  for (Throwable otherSuppressed : other.getSuppressed()) {
    addSuppressed(otherSuppressed);
  }
  if (other instanceof ElasticsearchException) {
    ElasticsearchException ex = (ElasticsearchException) other;
    for (String key : ex.getHeaderKeys()) {
      this.addHeader(key, ex.getHeader(key));
    }
    for (String key : ex.getMetadataKeys()) {
      this.addMetadata(key, ex.getMetadata(key));
    }
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

  @Override
  public void onFailure(Exception e) {
    final Throwable cause = unwrapCause(e);
    if (cause instanceof VersionConflictEngineException) {
      if (retryCount < request.retryOnConflict()) {
        threadPool.executor(executor()).execute(new ActionRunnable<UpdateResponse>(listener) {
          @Override
          protected void doRun() {
            shardOperation(request, listener, retryCount + 1);
          }
        });
        return;
      }
    }
    listener.onFailure(cause instanceof Exception ? (Exception) cause : new NotSerializableExceptionWrapper(cause));
  }
});
origin: apache/servicemix-bundles

public NotSerializableExceptionWrapper(Throwable other) {
  super(ElasticsearchException.getExceptionName(other) + ": " + other.getMessage(), other.getCause());
  this.name = ElasticsearchException.getExceptionName(other);
  this.status = ExceptionsHelper.status(other);
  setStackTrace(other.getStackTrace());
  for (Throwable otherSuppressed : other.getSuppressed()) {
    addSuppressed(otherSuppressed);
  }
  if (other instanceof ElasticsearchException) {
    ElasticsearchException ex = (ElasticsearchException) other;
    for (String key : ex.getHeaderKeys()) {
      this.addHeader(key, ex.getHeader(key));
    }
    for (String key : ex.getMetadataKeys()) {
      this.addMetadata(key, ex.getMetadata(key));
    }
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

  @Override
  public void onFailure(Exception e) {
    final Throwable cause = unwrapCause(e);
    if (cause instanceof VersionConflictEngineException) {
      if (retryCount < request.retryOnConflict()) {
        threadPool.executor(executor()).execute(new ActionRunnable<UpdateResponse>(listener) {
          @Override
          protected void doRun() {
            shardOperation(request, listener, retryCount + 1);
          }
        });
        return;
      }
    }
    listener.onFailure(cause instanceof Exception ? (Exception) cause : new NotSerializableExceptionWrapper(cause));
  }
});
origin: apache/servicemix-bundles

  private void handleUpdateFailureWithRetry(final ActionListener<UpdateResponse> listener, final UpdateRequest request,
                       final Exception failure, int retryCount) {
    final Throwable cause = unwrapCause(failure);
    if (cause instanceof VersionConflictEngineException) {
      if (retryCount < request.retryOnConflict()) {
        logger.trace("Retry attempt [{}] of [{}] on version conflict on [{}][{}][{}]",
            retryCount + 1, request.retryOnConflict(), request.index(), request.getShardId(), request.id());
        threadPool.executor(executor()).execute(new ActionRunnable<UpdateResponse>(listener) {
          @Override
          protected void doRun() {
            shardOperation(request, listener, retryCount + 1);
          }
        });
        return;
      }
    }
    listener.onFailure(cause instanceof Exception ? (Exception) cause : new NotSerializableExceptionWrapper(cause));
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

  private void handleUpdateFailureWithRetry(final ActionListener<UpdateResponse> listener, final UpdateRequest request,
                       final Exception failure, int retryCount) {
    final Throwable cause = unwrapCause(failure);
    if (cause instanceof VersionConflictEngineException) {
      if (retryCount < request.retryOnConflict()) {
        logger.trace("Retry attempt [{}] of [{}] on version conflict on [{}][{}][{}]",
            retryCount + 1, request.retryOnConflict(), request.index(), request.getShardId(), request.id());
        threadPool.executor(executor()).execute(new ActionRunnable<UpdateResponse>(listener) {
          @Override
          protected void doRun() {
            shardOperation(request, listener, retryCount + 1);
          }
        });
        return;
      }
    }
    listener.onFailure(cause instanceof Exception ? (Exception) cause : new NotSerializableExceptionWrapper(cause));
  }
}
origin: com.strapdata.elasticsearch/elasticsearch

  @Override
  public void onFailure(Exception e) {
    final Throwable cause = ExceptionsHelper.unwrapCause(e);
    if (cause instanceof VersionConflictEngineException) {
      if (retryCount < request.retryOnConflict()) {
        logger.trace("Retry attempt [{}] of [{}] on version conflict on [{}][{}][{}]",
            retryCount + 1, request.retryOnConflict(), request.index(), request.getShardId(), request.id());
        threadPool.executor(executor()).execute(new ActionRunnable<UpdateResponse>(listener) {
          @Override
          protected void doRun() {
            shardOperation(request, listener, retryCount + 1);
          }
        });
        return;
      }
    }
    listener.onFailure(cause instanceof Exception ? (Exception) cause : new NotSerializableExceptionWrapper(cause));
  }
});
origin: harbby/presto-connectors

  ex = (ElasticsearchException) throwable;
} else {
  ex = new NotSerializableExceptionWrapper(throwable);
origin: com.strapdata.elasticsearch/elasticsearch

  ex = (ElasticsearchException) throwable;
} else {
  ex = new NotSerializableExceptionWrapper(throwable);
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

  ex = (ElasticsearchException) throwable;
} else {
  ex = new NotSerializableExceptionWrapper(throwable);
origin: apache/servicemix-bundles

  ex = (ElasticsearchException) throwable;
} else {
  ex = new NotSerializableExceptionWrapper(throwable);
org.elasticsearch.common.io.streamNotSerializableExceptionWrapper

Javadoc

This exception can be used to wrap a given, not serializable exception to serialize via StreamOutput#writeException(Throwable). This class will preserve the stacktrace as well as the suppressed exceptions of the throwable it was created with instead of it's own. The stacktrace has no indication of where this exception was created.

Most used methods

  • <init>
  • addHeader
  • addSuppressed
  • setStackTrace
  • addMetadata

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now