net.snowflake.client.loader

## Class StreamLoader

- java.lang.Object
- - net.snowflake.client.loader.StreamLoader

All Implemented Interfaces:
  Runnable, Loader

    public class StreamLoader
    extends Object
    implements Loader, Runnable

Stream Loader

### Nested Class Summary

### Nested classes/interfaces inherited from interface net.snowflake.client.loader.Loader

`Loader.ConnectionError, Loader.DataError`

### Field Summary

Fields
`static long` `DEFAULT_BATCH_ROW_SIZE` Default batch row size
`static String` `FILE_PREFIX`
`static String` `FILE_SUFFIX`
`static DatabaseMetaData` `metadata`

### Fields inherited from interface net.snowflake.client.loader.Loader

`BASE, tmpdir`

### Constructor Summary

Constructors
Constructor and Description
`StreamLoader(Map<LoaderProperty,Object> properties, Connection putConnection, Connection processConnection)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `abort(RuntimeException t)`
`void` `close()` Close connections that have been provided upon initialization
`void` `finish()` Finishes loader
`String` `getFullTableName()`
`LoadResultListener` `getListener()`
`String` `getNoise()`
`boolean` `isAborted()`
`void` `resetOperation(Operation op)` If operation is changed, previous data is committed
`void` `rollback()` Rollback uncommitted changes.
`void` `run()`
`void` `setListener(LoadResultListener _listener)`
`void` `setProperty(LoaderProperty property, Object value)`
`void` `setTestMode(boolean mode)`
`void` `start()` Starts the loader
`void` `submitRow(Object[] row)` Pass row data

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### FILE_PREFIX

    public static final String FILE_PREFIX

See Also:
  Constant Field Values

#### FILE_SUFFIX

    public static final String FILE_SUFFIX

See Also:
  Constant Field Values

#### DEFAULT_BATCH_ROW_SIZE

    public static final long DEFAULT_BATCH_ROW_SIZE

Default batch row size

See Also:
  Constant Field Values

#### metadata

    public static DatabaseMetaData metadata

### Constructor Detail

#### StreamLoader

    public StreamLoader(Map<LoaderProperty,Object> properties,
                        Connection putConnection,
                        Connection processConnection)

### Method Detail

#### setProperty

    public void setProperty(LoaderProperty property,
                            Object value)

Specified by:
  `setProperty` in interface `Loader`

#### start

    public void start()

Starts the loader

Specified by:
  `start` in interface `Loader`

#### getNoise

    public String getNoise()

#### abort

    public void abort(RuntimeException t)

#### isAborted

    public boolean isAborted()

#### rollback

    public void rollback()

Description copied from interface: `Loader`
Rollback uncommitted changes. If no transaction was initialized, indeterminate fraction of rows could have been committed.

Specified by:
  `rollback` in interface `Loader`

#### submitRow

    public void submitRow(Object[] row)

Description copied from interface: `Loader`
Pass row data

Specified by:
  `submitRow` in interface `Loader`

#### run

    public void run()

Specified by:
  `run` in interface `Runnable`

#### finish

    public void finish()
                throws Exception

Finishes loader

Specified by:
  `finish` in interface `Loader`
Throws:
  `Exception`

#### close

    public void close()

Description copied from interface: `Loader`
Close connections that have been provided upon initialization

Specified by:
  `close` in interface `Loader`

#### resetOperation

    public void resetOperation(Operation op)

Description copied from interface: `Loader`
If operation is changed, previous data is committed

Specified by:
  `resetOperation` in interface `Loader`
Parameters:
  `op` - operation will be reset

#### getFullTableName

    public String getFullTableName()

#### getListener

    public LoadResultListener getListener()

Specified by:
  `getListener` in interface `Loader`

#### setListener

    public void setListener(LoadResultListener _listener)

Specified by:
  `setListener` in interface `Loader`

#### setTestMode

    public void setTestMode(boolean mode)