Package org.springframework.batch.support.transaction

Examples of org.springframework.batch.support.transaction.TransactionAwareBufferedWriter


     */
    private Writer getBufferedWriter(FileChannel fileChannel, String encoding) {
      try {
        final FileChannel channel = fileChannel;
        if (transactional) {
          TransactionAwareBufferedWriter writer = new TransactionAwareBufferedWriter(channel, new Runnable() {
            @Override
            public void run() {
              closeStream();
            }
          });

          writer.setEncoding(encoding);
          writer.setForceSync(forceSync);
          return writer;
        }
        else {
          Writer writer = new BufferedWriter(Channels.newWriter(fileChannel, encoding)) {
            @Override
View Full Code Here


    }

    try {
      final FileChannel channel = fileChannel;
      if (transactional) {
        TransactionAwareBufferedWriter writer = new TransactionAwareBufferedWriter(channel, new Runnable() {
          @Override
          public void run() {
            closeStream();
          }
        });

        writer.setEncoding(encoding);
        writer.setForceSync(forceSync);
        bufferedWriter = writer;
      }
      else {
        bufferedWriter =  new BufferedWriter(new OutputStreamWriter(os, encoding));
      }
View Full Code Here

TOP

Related Classes of org.springframework.batch.support.transaction.TransactionAwareBufferedWriter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.