public class CopyDualImpl extends CopyOperationImpl implements CopyDual
| Constructor and Description |
|---|
CopyDualImpl() |
| Modifier and Type | Method and Description |
|---|---|
long |
endCopy()
Finishes copy operation successfully.
|
void |
flushCopy()
Force any buffered output to be sent over the network to the backend.
|
void |
handleCommandStatus(String status) |
protected void |
handleCopydata(byte[] data)
Consume received copy data.
|
byte[] |
readFromCopy()
Blocks wait for a row of data to be received from server on an active copy operation.
|
byte[] |
readFromCopy(boolean block)
Wait for a row of data to be received from server on an active copy operation.
|
void |
writeToCopy(byte[] data,
int off,
int siz)
Writes specified part of given byte array to an open and writable copy operation.
|
void |
writeToCopy(ByteStreamWriter from)
Writes a ByteStreamWriter to an open and writable copy operation.
|
cancelCopy, getFieldCount, getFieldFormat, getFormat, getHandledRowCount, getQueryExecutor, isActiveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancelCopy, getFieldCount, getFieldFormat, getFormat, getHandledRowCount, isActivepublic void writeToCopy(byte[] data,
int off,
int siz)
throws SQLException
CopyInwriteToCopy in interface CopyIndata - array of bytes to writeoff - offset of first byte to write (normally zero)siz - number of bytes to write (normally buf.length)SQLException - if the operation failspublic void writeToCopy(ByteStreamWriter from) throws SQLException
CopyInwriteToCopy in interface CopyInfrom - the source of bytes, e.g. a ByteBufferByteStreamWriterSQLException - if the operation failspublic void flushCopy()
throws SQLException
CopyInflushCopy in interface CopyInSQLException - if the operation fails.public long endCopy()
throws SQLException
CopyInendCopy in interface CopyInSQLException - if the operation fails.public byte[] readFromCopy()
throws SQLException
CopyOutreadFromCopy in interface CopyOutSQLException - if something goes wrong for example socket timeoutpublic byte[] readFromCopy(boolean block)
throws SQLException
CopyOutreadFromCopy in interface CopyOutblock - true if need wait data from server otherwise false and will read
pending message from serverSQLException - if something goes wrong for example socket timeoutpublic void handleCommandStatus(String status) throws PSQLException
handleCommandStatus in class CopyOperationImplPSQLExceptionprotected void handleCopydata(byte[] data)
CopyOperationImplhandleCopydata in class CopyOperationImpldata - data that was receive by copy protocolCopyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.