Codota Logo
AnalysisResultSaveHandler.saveOrThrow
Code IndexAdd Codota to your IDE (free)

How to use
saveOrThrow
method
in
org.datacleaner.result.save.AnalysisResultSaveHandler

Best Java code snippets using org.datacleaner.result.save.AnalysisResultSaveHandler.saveOrThrow (Showing top 5 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: datacleaner/DataCleaner

public boolean saveAttempt() {
  try {
    saveOrThrow();
    return true;
  } catch (final SerializationException e) {
    return false;
  }
}
origin: datacleaner/DataCleaner

public void saveOrThrow() throws SerializationException {
  saveOrThrow(_analysisResult, _resource);
}
origin: datacleaner/DataCleaner

public void saveWithoutUnsafeResultElements() {
  final AnalysisResult safeAnalysisResult = createSafeAnalysisResult();
  saveOrThrow(safeAnalysisResult, _resource);
}
origin: datacleaner/DataCleaner

private static void saveResult(final AnalysisResultFuture result, final Resource resultResource) {
  final AnalysisResultSaveHandler analysisResultSaveHandler =
      new AnalysisResultSaveHandler(result, resultResource);
  try {
    analysisResultSaveHandler.saveOrThrow();
  } catch (final SerializationException e) {
    // attempt to save what we can - and then rethrow
    final AnalysisResult safeAnalysisResult = analysisResultSaveHandler.createSafeAnalysisResult();
    if (safeAnalysisResult == null) {
      logger.error("Serialization of result failed without any safe result elements to persist");
    } else {
      final Map<ComponentJob, AnalyzerResult> unsafeResultElements =
          analysisResultSaveHandler.getUnsafeResultElements();
      logger.error("Serialization of result failed with the following unsafe elements: {}",
          unsafeResultElements);
      logger.warn("Partial AnalysisResult will be persisted to filename '{}'",
          resultResource.getQualifiedPath());
      analysisResultSaveHandler.saveWithoutUnsafeResultElements();
    }
    // rethrow the exception regardless
    throw e;
  }
}
origin: org.eobjects.datacleaner/DataCleaner-monitor-services

final AnalysisResultSaveHandler analysisResultSaveHandler = new AnalysisResultSaveHandler((AnalysisResult) result, resource);
try {
  analysisResultSaveHandler.saveOrThrow();
} catch (SerializationException e) {
org.datacleaner.result.saveAnalysisResultSaveHandlersaveOrThrow

Popular methods of AnalysisResultSaveHandler

  • createSafeAnalysisResult
  • getUnsafeResultElements
  • <init>
  • saveWithoutUnsafeResultElements
  • saveAttempt

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Permission (java.security)
    Abstract class for representing access to a system resource. All permissions have a name (whose inte
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now