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(java.lang.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 java.sql.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)java.sql.SQLException - if the operation failspublic void writeToCopy(ByteStreamWriter from) throws java.sql.SQLException
CopyInwriteToCopy in interface CopyInfrom - the source of bytes, e.g. a ByteBufferByteStreamWriterjava.sql.SQLException - if the operation failspublic void flushCopy()
throws java.sql.SQLException
CopyInpublic long endCopy()
throws java.sql.SQLException
CopyInpublic byte[] readFromCopy()
throws java.sql.SQLException
CopyOutreadFromCopy in interface CopyOutjava.sql.SQLException - if something goes wrong for example socket timeoutpublic byte[] readFromCopy(boolean block)
throws java.sql.SQLException
CopyOutreadFromCopy in interface CopyOutblock - true if need wait data from server otherwise false and will read
pending message from serverjava.sql.SQLException - if something goes wrong for example socket timeoutpublic void handleCommandStatus(java.lang.String status)
throws PSQLException
handleCommandStatus in class CopyOperationImplPSQLExceptionprotected void handleCopydata(byte[] data)
CopyOperationImplhandleCopydata in class CopyOperationImpldata - data that was receive by copy protocolCopyright © 2025 PostgreSQL Global Development Group. All rights reserved.