Codota Logo
MongoItemWriter.transactionActive
Code IndexAdd Codota to your IDE (free)

How to use
transactionActive
method
in
org.springframework.batch.item.data.MongoItemWriter

Best Java code snippets using org.springframework.batch.item.data.MongoItemWriter.transactionActive (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-batch

/**
 * If a transaction is active, buffer items to be written just before commit.
 * Otherwise write items using the provided template.
 *
 * @see org.springframework.batch.item.ItemWriter#write(List)
 */
@Override
public void write(List<? extends T> items) throws Exception {
  if(!transactionActive()) {
    doWrite(items);
    return;
  }
  List<T> bufferedItems = getCurrentBuffer();
  bufferedItems.addAll(items);
}
origin: apache/servicemix-bundles

/**
 * If a transaction is active, buffer items to be written just before commit.
 * Otherwise write items using the provided template.
 *
 * @see org.springframework.batch.item.ItemWriter#write(List)
 */
@Override
public void write(List<? extends T> items) throws Exception {
  if(!transactionActive()) {
    doWrite(items);
    return;
  }
  List<T> bufferedItems = getCurrentBuffer();
  bufferedItems.addAll(items);
}
org.springframework.batch.item.dataMongoItemWritertransactionActive

Popular methods of MongoItemWriter

  • <init>
  • setCollection
    Set the name of the Mongo collection to be written to.
  • setDelete
    Indicates if the items being passed to the writer are to be saved or removed from the data store. If
  • setTemplate
    Set the MongoOperations to be used to save items to be written.
  • doWrite
    Performs the actual write to the store via the template. This can be overridden by a subclass if nec
  • getCurrentBuffer
  • afterPropertiesSet
  • write
    If a transaction is active, buffer items to be written just before commit. Otherwise write items usi

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • orElseThrow (Optional)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • ImageIO (javax.imageio)
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
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