congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ChunkMonitor.resetOffset
Code IndexAdd Tabnine to your IDE (free)

How to use
resetOffset
method
in
org.springframework.batch.core.step.item.ChunkMonitor

Best Java code snippets using org.springframework.batch.core.step.item.ChunkMonitor.resetOffset (Showing top 20 results out of 315)

origin: spring-projects/spring-batch

public void incrementOffset() {
  ChunkMonitorData data = getData();
  data.offset ++;
  if (data.offset >= data.chunkSize) {
    resetOffset();
  }
}
origin: spring-projects/spring-batch

public void setChunkSize(int chunkSize) {
  getData().chunkSize = chunkSize;
  resetOffset();
}
origin: spring-projects/spring-batch

@Override
public void open(ExecutionContext executionContext) throws ItemStreamException {
  super.open(executionContext);
  if (streamsRegistered) {
    stream.open(executionContext);
    ChunkMonitorData data = new ChunkMonitorData(executionContext.getInt(getExecutionContextKey(OFFSET), 0), 0);
    holder.set(data);
    if (reader == null) {
      logger.warn("No ItemReader set (must be concurrent step), so ignoring offset data.");
      return;
    }
    for (int i = 0; i < data.offset; i++) {
      try {
        reader.read();
      }
      catch (Exception e) {
        throw new ItemStreamException("Could not position reader with offset: " + data.offset, e);
      }
    }
    resetOffset();
  }
}
origin: spring-projects/spring-batch

@Test
public void testResetOffsetManually() {
  monitor.incrementOffset();
  monitor.resetOffset();
  assertEquals(0, monitor.getOffset());
}
origin: spring-projects/spring-batch

data.scanning(false);
inputs.setBusy(false);
chunkMonitor.resetOffset();
return;
data.scanning(false);
inputs.setBusy(false);
chunkMonitor.resetOffset();
origin: spring-projects/spring-batch

@Test
public void testUpdateOnBoundary() {
  monitor.resetOffset();
  ExecutionContext executionContext = new ExecutionContext();
  monitor.update(executionContext);
  assertEquals(0, executionContext.size());
  executionContext.put(ChunkMonitor.class.getName() + ".OFFSET", 3);
  monitor.update(executionContext);
  assertEquals(0, executionContext.size());
}
origin: org.springframework.batch/spring-batch-core

public void setChunkSize(int chunkSize) {
  getData().chunkSize = chunkSize;
  resetOffset();
}
origin: org.springframework.batch/spring-batch-core

public void incrementOffset() {
  ChunkMonitorData data = getData();
  data.offset ++;
  if (data.offset >= data.chunkSize) {
    resetOffset();
  }
}
origin: org.springframework.batch/org.springframework.batch.core

public void incrementOffset() {
  ChunkMonitorData data = getData();
  data.offset ++;
  if (data.offset >= data.chunkSize) {
    resetOffset();
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

public void incrementOffset() {
  ChunkMonitorData data = getData();
  data.offset ++;
  if (data.offset >= data.chunkSize) {
    resetOffset();
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

public void setChunkSize(int chunkSize) {
  getData().chunkSize = chunkSize;
  resetOffset();
}
origin: apache/servicemix-bundles

public void incrementOffset() {
  ChunkMonitorData data = getData();
  data.offset ++;
  if (data.offset >= data.chunkSize) {
    resetOffset();
  }
}
origin: org.springframework.batch/org.springframework.batch.core

public void setChunkSize(int chunkSize) {
  getData().chunkSize = chunkSize;
  resetOffset();
}
origin: apache/servicemix-bundles

public void setChunkSize(int chunkSize) {
  getData().chunkSize = chunkSize;
  resetOffset();
}
origin: org.springframework.batch/spring-batch-core

@Override
public void open(ExecutionContext executionContext) throws ItemStreamException {
  super.open(executionContext);
  if (streamsRegistered) {
    stream.open(executionContext);
    ChunkMonitorData data = new ChunkMonitorData(executionContext.getInt(getExecutionContextKey(OFFSET), 0), 0);
    holder.set(data);
    if (reader == null) {
      logger.warn("No ItemReader set (must be concurrent step), so ignoring offset data.");
      return;
    }
    for (int i = 0; i < data.offset; i++) {
      try {
        reader.read();
      }
      catch (Exception e) {
        throw new ItemStreamException("Could not position reader with offset: " + data.offset, e);
      }
    }
    resetOffset();
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

@Override
public void open(ExecutionContext executionContext) throws ItemStreamException {
  super.open(executionContext);
  if (streamsRegistered) {
    stream.open(executionContext);
    ChunkMonitorData data = new ChunkMonitorData(executionContext.getInt(getExecutionContextKey(OFFSET), 0), 0);
    holder.set(data);
    if (reader == null) {
      logger.warn("No ItemReader set (must be concurrent step), so ignoring offset data.");
      return;
    }
    for (int i = 0; i < data.offset; i++) {
      try {
        reader.read();
      }
      catch (Exception e) {
        throw new ItemStreamException("Could not position reader with offset: " + data.offset, e);
      }
    }
    resetOffset();
  }
}
origin: apache/servicemix-bundles

@Override
public void open(ExecutionContext executionContext) throws ItemStreamException {
  super.open(executionContext);
  if (streamsRegistered) {
    stream.open(executionContext);
    ChunkMonitorData data = new ChunkMonitorData(executionContext.getInt(getExecutionContextKey(OFFSET), 0), 0);
    holder.set(data);
    if (reader == null) {
      logger.warn("No ItemReader set (must be concurrent step), so ignoring offset data.");
      return;
    }
    for (int i = 0; i < data.offset; i++) {
      try {
        reader.read();
      }
      catch (Exception e) {
        throw new ItemStreamException("Could not position reader with offset: " + data.offset, e);
      }
    }
    resetOffset();
  }
}
origin: org.springframework.batch.core/org.motechproject.org.springframework.batch.core

data.scanning(false);
inputs.setBusy(false);
chunkMonitor.resetOffset();
return;
data.scanning(false);
inputs.setBusy(false);
chunkMonitor.resetOffset();
origin: org.springframework.batch/spring-batch-core

data.scanning(false);
inputs.setBusy(false);
chunkMonitor.resetOffset();
return;
data.scanning(false);
inputs.setBusy(false);
chunkMonitor.resetOffset();
origin: org.springframework.batch/org.springframework.batch.core

if (outputs.isEmpty()) {
  inputs.setBusy(false);
  chunkMonitor.resetOffset();
org.springframework.batch.core.step.itemChunkMonitorresetOffset

Popular methods of ChunkMonitor

  • incrementOffset
  • registerItemStream
  • setChunkSize
  • setItemReader
  • getData
  • getExecutionContextKey
  • setExecutionContextName
  • <init>
  • close
  • getOffset
  • open
  • update
  • open,
  • update

Popular in Java

  • Reactive rest calls using spring rest template
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • setRequestProperty (URLConnection)
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • JList (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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