jdbc-protolib/src/main/java/com/streamsets/pipeline/lib/jdbc/multithread/MultithreadedTableProvider.java
public TableRuntimeContext nextTable(int threadNumber) throws InterruptedException {
    synchronized (partitionStateLock) {
      acquireTableAsNeeded(threadNumber);

      final TableRuntimeContext partition = getOwnedTablesQueue().pollFirst();
      if (partition != null) {
        offerToOwnedTablesQueue(partition, threadNumber);
      }
      return partition;
    }
  }
public TableRuntimeContext nextTable(int threadNumber) throws InterruptedException {
    synchronized (partitionStateLock) {
      acquireTableAsNeeded(threadNumber);

      final TableRuntimeContext partition = getOwnedTablesQueue().pollFirst();
      if (partition != null) {
        offerToOwnedTablesQueue(partition, threadNumber);
      }
      return partition;
    }
  }
public TableRuntimeContext nextTable ( int threadNumber ) throws InterruptedException { synchronized ( partitionStateLock ) { acquireTableAsNeeded ( threadNumber ) ; final TableRuntimeContext partition = getOwnedTablesQueue ( ) . pollFirst ( ) ; if ( partition != null ) { offerToOwnedTablesQueue ( partition , threadNumber ) ; } return partition ; } }
Return the next table to work on for the current thread (Will not return null)
Deque the current element from head of the queue and put it back at the tail to queue.
Return the next table to work on for the current thread ( Will not return null ) Deque the current element from head of the queue and put it back at the tail to queue .