com.amazon.redshift.copy

## Interface CopyOperation

All Known Subinterfaces:
  CopyDual, CopyIn, CopyOut

All Known Implementing Classes:
  CopyDualImpl, CopyInImpl, CopyOperationImpl, CopyOutImpl, RedshiftCopyInputStream, RedshiftCopyOutputStream

    public interface CopyOperation

Exchange bulk data between client and Redshift database tables. See CopyIn and CopyOut for full interfaces for corresponding copy directions.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `cancelCopy()` Cancels this copy operation, discarding any exchanged data.
`int` `getFieldCount()`
`int` `getFieldFormat(int field)`
`int` `getFormat()`
`long` `getHandledRowCount()` After successful end of copy, returns the number of database records handled in that operation.
`boolean` `isActive()`

### Method Detail

#### getFieldCount

    int getFieldCount()

Returns:
  number of fields in each row for this operation

#### getFormat

    int getFormat()

Returns:
  overall format of each row: 0 = textual, 1 = binary

#### getFieldFormat

    int getFieldFormat(int field)

Parameters:
  `field` - number of field (0..fieldCount()-1)
Returns:
  format of requested field: 0 = textual, 1 = binary

#### isActive

    boolean isActive()

Returns:
  is connection reserved for this Copy operation?

#### cancelCopy

    void cancelCopy()
             throws SQLException

Cancels this copy operation, discarding any exchanged data.

Throws:
  `SQLException` - if cancelling fails

#### getHandledRowCount

    long getHandledRowCount()

After successful end of copy, returns the number of database records handled in that operation. Unimplemented in Redshift server. Returns -1.

Returns:
  number of handled rows or -1